View Source Tremorx.Components.DonutChart (tremorx v0.1.0)
Renders DonutChart
Summary
Functions
A donut chart displays quantitative information through a circular visualization.
Functions
A donut chart displays quantitative information through a circular visualization.
Attributes
id
(:string
) - The id of the chart. Defaults to"donutchart"
.value
(:string
) (required) - The value key of the data.category
(:string
) (required) - The category key of the data.label
(:string
) - The label of the data. Defaults to""
.show_animation
(:boolean
) - Whether to show animation when the chart is rendered. Defaults tofalse
.show_label
(:boolean
) - Whether to show the label. Defaults tofalse
.show_tooltip
(:boolean
) - Whether to show the tooltip on hover. Defaults totrue
.no_data_text
(:string
) - The text to display when there is no data. Defaults to""
.value_format
(:string
) - The format to use for the value. Defaults to"(,.0f"
.pad_angle
(:float
) - The padding angle between slices in radians. Defaults to0.014
.inner_radius_percent
(:float
) - The inner radius of the donut chart as a percentage of the outer radius. Defaults to0.75
.padding
(:integer
) - The vertical padding between the chart and the container. Defaults to8
.data
(:list
) (required) - The data to display on the chart.colors
(:list
) - The colors to use for each category. Defaults to[]
.class
(:string
) - css classes to apply to the chart wrapper container. Defaults tonil
.variant
(:string
) - The variant of the chart. Defaults to"donut"
.- Global attributes are accepted.