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 to false.
  • show_label (:boolean) - Whether to show the label. Defaults to false.
  • show_tooltip (:boolean) - Whether to show the tooltip on hover. Defaults to true.
  • 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 to 0.014.
  • inner_radius_percent (:float) - The inner radius of the donut chart as a percentage of the outer radius. Defaults to 0.75.
  • padding (:integer) - The vertical padding between the chart and the container. Defaults to 8.
  • 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 to nil.
  • variant (:string) - The variant of the chart. Defaults to "donut".
  • Global attributes are accepted.