shadcn-vue/apps/www/src/content/docs/charts/donut.md
Saeid Zareie 63732f1c47
docs: adding changelog page (#617)
* chore: adding changelog page

* docs: cleanup

---------

Co-authored-by: zernonia <zernonia@gmail.com>
2024-06-18 09:18:04 +08:00

1.1 KiB

title description source label
Donut A line chart visually represents data in a circular form, similar to a pie chart but with a central void, emphasizing proportions within categories. apps/www/src/lib/registry/default/ui/chart-donut Alpha

Installation

Only works with Vue >3.3

Run the following command

npx shadcn-vue@latest add chart-donut

Setup

Follow the guide to complete the setup.

API

Example

Pie Chart

If you want to render pie chart instead, pass type as pie.

Color

We generate colors automatically based on the primary and secondary color and assigned them accordingly. Feel free to pass in your own array of colors.

Custom Tooltip

If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition here.