-
Notifications
You must be signed in to change notification settings - Fork 11
Pie Chart
Michal Töpfer edited this page Dec 15, 2020
·
3 revisions
-
config
: Config [R] – chart configuration object, specifies the data-
Config:
-
arcs
: Arc[] – array of configurations of the arcs
-
-
Arc:
-
label
: string [R] – label displayed in the legend -
color
: d3-color.color [R] – color of the arc -
value
: number [R] – determines the size (angle) of the arc
-
-
Config:
-
height
: number [R] margin
: Margin-
getArcColor
: function – Function to modify the color of the arc before rendering. Gets theArc.color
as argument and the returned value is used as fill color of each arc. Note: this does NOT modify the color in the legend. -
getLabelColor
: function – Gets theArc.color
as argument and the returned value is used as text color for the label. -
legendWidth
: number – width of the legend in pixels -
legendPosition
: LegendPosition – position of the legend- possible values:
LegendPosition.NONE
,LegendPosition.RIGHT
,LegendPosition.BOTTOM
- possible values:
-
legendRowClass
: string – CSS class applied to each row of the legend
To set the data, use the config
property and set the label
and value
of each bar. This chart does not fetch any data from the server, it only displays the data it got through its properties.