-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
feature 💡A new feature request or an enhancement proposalA new feature request or an enhancement proposal
Description
Describe the bug / 问题描述
import { Graph } from '@antv/g6';
fetch('https://assets.antv.antgroup.com/g6/combo.json')
.then((res) => res.json())
.then((data) => {
const graph = new Graph({
container: 'container',
data,
layout: {
type: 'combo-combined',
comboPadding: 2,
},
node: {
style: {
size: 20,
labelText: (d) => d.id,
},
palette: {
type: 'group',
field: (d) => d.combo,
},
},
edge: {
style: (model) => {
const { size, color } = model.data;
return {
stroke: color || '#99ADD1',
lineWidth: size || 1,
};
},
},
behaviors: ['drag-element', 'drag-canvas', 'zoom-canvas',
{type: 'fix-element-size', enable: true}],
autoFit: 'view',
});
graph.render();
});
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
Version / 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他
Metadata
Metadata
Assignees
Labels
feature 💡A new feature request or an enhancement proposalA new feature request or an enhancement proposal