g6/fff33d9f-async.b61d0899.js

2 lines
13 KiB
JavaScript
Raw Normal View History

2024-11-28 17:15:47 +08:00
(("undefined"!=typeof globalThis?globalThis:self)["makoChunk_@antv/g6-site"]=("undefined"!=typeof globalThis?globalThis:self)["makoChunk_@antv/g6-site"]||[]).push([["fff33d9f"],{"06c8bb2a":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"texts",{enumerable:!0,get:function(){return a;}}),t("b1d1c242");let a=[{value:"createGraph(\n {\n data: {\n nodes: Array.from({ length: 10 }).map((_, i) => ({\n id: `node-${i}`,\n data: { category: i === 0 ? 'central' : 'around' },\n })),\n edges: Array.from({ length: 9 }).map((_, i) => ({ source: `node-0`, target: `node-${i + 1}` })),\n },\n node: {\n style: {\n size: 20,\n },\n palette: {\n field: 'category',\n color: 'tableau',\n },\n },\n edge: {\n style: {\n stroke: 'lightgreen',\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n layout: {\n type: 'd3-force',\n },\n },\n { width: 200, height: 200 },\n);\n",paraId:0}];},"0b73e109":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"texts",{enumerable:!0,get:function(){return a;}}),t("dc703ccb");let a=[{value:"createGraph(\n {\n data: {\n nodes: [\n { id: 'node-1', style: { x: 50, y: 50 } },\n { id: 'node-2', style: { x: 150, y: 50 } },\n ],\n edges: [{ source: 'node-1', target: 'node-2' }],\n },\n node: {\n type: (datum) => (datum.id === 'node-1' ? 'circle' : 'rect'),\n style: {\n fill: 'pink',\n size: 20,\n },\n },\n edge: {\n style: {\n stroke: 'lightgreen',\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n },\n { width: 300, height: 200 },\n);\n",paraId:0}];},"13747ce4":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"texts",{enumerable:!0,get:function(){return a;}}),t("9a243a9b");let a=[{value:"createGraph(\n {\n data: {\n nodes: new Array(6).fill(0).map((_, i) => ({ id: `node-${i}`, data: { category: ['A', 'B', 'C'][i % 3] } })),\n },\n layout: { type: 'grid', cols: 6 },\n node: {\n palette: {\n type: 'group',\n field: 'category',\n color: 'tableau',\n },\n },\n },\n { width: 200, height: 50 },\n);\n",paraId:0}];},"1a63caa3":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"texts",{enumerable:!0,get:function(){return a;}}),t("dc032f13");let a=[{value:"createGraph(\n {\n data: {\n nodes: new Array(30).fill(0).map((_, i) => ({ id: `node-${i}` })),\n },\n layout: { type: 'grid', cols: 10, rows: 3 },\n node: {\n palette: 'spectral',\n },\n },\n { width: 400, height: 100 },\n);\n",paraId:0}];},"25c0c472":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"texts",{enumerable:!0,get:function(){return a;}}),t("e05a8de6");let a=[{value:"createGraph(\n {\n data: {\n nodes: [\n { id: 'node-1', style: { x: 50, y: 50 } },\n { id: 'node-2', style: { x: 150, y: 50 } },\n ],\n edges: [{ source: 'node-1', target: 'node-2' }],\n },\n },\n { width: 200, height: 100 },\n);\n",paraId:0}];},"28eecdf4":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"demos",{enumerable:!0,get:function(){return a;}}),t("78b3ac91"),t("56f8f4a7");let a={};},"2b77b478":function(e,n,t){"use strict";t.d(n,"__esModule",{value:!0}),t.d(n,"texts",{enumerable:!0,get:function(){return a;}}),t("b4a75f89");let a=[{value:"(() => {\n const { register, Circle, Graph } = window.g6;\n\n class BreathingCircle extends Circle {\n onCreate() {\n this.shapeMap.halo.animate([{ lineWidth: 5 }, { lineWidth: 10 }], {\n duration: 1000,\n iterations: Infinity,\n direction: 'alternate',\n });\n }\n }\n\n register('node', 'breathing-circle', BreathingCircle);\n\n const container = createContainer({ width: 50, height: 50 });\n\n const graph = new Graph({\n container,\n width: 50,\n height: 50,\n data: {\n nodes: [{ id: 'node-1', style: { x: 25, y: 25 } }],\n
//# sourceMappingURL=fff33d9f-async.b61d0899.js.map