new D3Pie()
Subsystem rendering 2d pie chart in an svg div.
D3Pie only save drawn pie chart with D3, then save the domId in component CanvTex,
let Thrender create the plane object.
See Thrender.createObj3s
AssetType.DomCanvas branch.
reference: https://observablehq.com/@d3/pie-chart
- Source:
Members
(static) svguuid
For generating Pie object uuid.
- Source:
Methods
(static) debugPie3(ecs, options, json)
Generate a debugging object (pie) for hard coded parameters.
Parameters:
Name | Type | Description |
---|---|---|
ecs |
ECS | |
options |
Object | igonered |
json |
Object | the data to draw the canvas - debugPie3 didn't touched |
- Source:
(static) drawPie(cmpCanv, json, options)
Draw a d3 pie, to cmpCanv.domId.
Parameters:
Name | Type | Description |
---|---|---|
cmpCanv |
Cavnas | |
json |
Object.<{rows: Array, columns: Array}> | e.g. |
options |
Object | {wh: { width, height }, xy: [x, y], color: ['#123456', ...]} |
- Source:
(static) pies(ecs, json, options)
create pies
Parameters:
Name | Type | Description |
---|---|---|
ecs |
ECS | |
json |
Object | {pie: [p]}, |
options |
Object |
- Source:
(static) svgUId() → {String}
Get a uuid.
- Source:
Returns:
3pie-id
- Type
- String
onMouse(cmd, e)
Handle mouse cmd.
Parameters:
Name | Type | Description |
---|---|---|
cmd |
String | |
e |
Event |
- Source:
update(tick, entities)
Parameters:
Name | Type | Description |
---|---|---|
tick |
int | |
entities |
Array.<Entity> |
- Source: