diff --git a/apps/www/src/content/docs/charts/area.md b/apps/www/src/content/docs/charts/area.md index ae4c6acd..72722ef1 100644 --- a/apps/www/src/content/docs/charts/area.md +++ b/apps/www/src/content/docs/charts/area.md @@ -1,6 +1,7 @@ --- title: Area description: An area chart visually represents data over time, displaying trends and patterns through filled-in areas under a line graph. +source: apps/www/src/lib/registry/default/ui/chart-area label: Alpha --- @@ -20,22 +21,8 @@ label: Alpha npx shadcn-vue@latest add chart-area ``` -### Update `css` +### Setup -Add the following tooltip styling to your `tailwind.css` file: - -```css -@layer base { - :root { - /* ... */ - --vis-secondary-color: 160 81% 40%; - --vis-tooltip-background-color: none !important; - --vis-tooltip-border-color: none !important; - --vis-tooltip-text-color: none !important; - --vis-tooltip-shadow-color: none !important; - --vis-tooltip-backdrop-filter: none !important; - --vis-tooltip-padding: none !important; - } -``` +Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. diff --git a/apps/www/src/content/docs/charts/bar.md b/apps/www/src/content/docs/charts/bar.md index 906c7eef..7c5385b3 100644 --- a/apps/www/src/content/docs/charts/bar.md +++ b/apps/www/src/content/docs/charts/bar.md @@ -1,6 +1,7 @@ --- title: Bar description: An line chart visually represents data using rectangular bars of varying lengths to compare quantities across different categories or groups. +source: apps/www/src/lib/registry/default/ui/chart-bar label: Alpha --- @@ -20,22 +21,8 @@ label: Alpha npx shadcn-vue@latest add chart-bar ``` -### Update `css` +### Setup -Add the following tooltip styling to your `tailwind.css` file: - -```css -@layer base { - :root { - /* ... */ - --vis-secondary-color: 160 81% 40%; - --vis-tooltip-background-color: none !important; - --vis-tooltip-border-color: none !important; - --vis-tooltip-text-color: none !important; - --vis-tooltip-shadow-color: none !important; - --vis-tooltip-backdrop-filter: none !important; - --vis-tooltip-padding: none !important; - } -``` +Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. diff --git a/apps/www/src/content/docs/charts/donut.md b/apps/www/src/content/docs/charts/donut.md index ba4425c4..3f07af01 100644 --- a/apps/www/src/content/docs/charts/donut.md +++ b/apps/www/src/content/docs/charts/donut.md @@ -1,6 +1,7 @@ --- title: Donut description: An line chart visually represents data in a circular form, similar to a pie chart but with a central void, emphasizing proportions within categories. +source: apps/www/src/lib/registry/default/ui/chart-donut label: Alpha --- @@ -20,22 +21,8 @@ Only works with Vue >3.3 npx shadcn-vue@latest add chart-donut ``` -### Update `css` +### Setup -Add the following tooltip styling to your `tailwind.css` file: - -```css -@layer base { - :root { - /* ... */ - --vis-secondary-color: 160 81% 40%; - --vis-tooltip-background-color: none !important; - --vis-tooltip-border-color: none !important; - --vis-tooltip-text-color: none !important; - --vis-tooltip-shadow-color: none !important; - --vis-tooltip-backdrop-filter: none !important; - --vis-tooltip-padding: none !important; - } -``` +Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. diff --git a/apps/www/src/content/docs/charts/guide.md b/apps/www/src/content/docs/charts/guide.md index 46bca4e4..60c202f1 100644 --- a/apps/www/src/content/docs/charts/guide.md +++ b/apps/www/src/content/docs/charts/guide.md @@ -1,3 +1,43 @@ -chartinggg +--- +title: Guide +description: A simple guide to help setup chart components. +label: Alpha +--- -hihi +`Charts` components were built on top of [Unovis](https://unovis.dev/) (a modular data visualization framework), and inspired by [tremor](https://www.tremor.so). + +## Installation + + + Only works with Vue >3.3 + + + + +### Run the following command + +```bash +npx shadcn-vue@latest add chart +``` + +### Update `css` + +Add the following tooltip styling to your `tailwind.css` file: + +```css +@layer base { + :root { + /* ... */ + --vis-tooltip-background-color: none !important; + --vis-tooltip-border-color: none !important; + --vis-tooltip-text-color: none !important; + --vis-tooltip-shadow-color: none !important; + --vis-tooltip-backdrop-filter: none !important; + --vis-tooltip-padding: none !important; + + /* secondary color, change to any hsl value you want */ + --vis-secondary-color: 160 81% 40%; + } +``` + + diff --git a/apps/www/src/content/docs/charts/line.md b/apps/www/src/content/docs/charts/line.md index 1c222675..00547d98 100644 --- a/apps/www/src/content/docs/charts/line.md +++ b/apps/www/src/content/docs/charts/line.md @@ -1,6 +1,7 @@ --- title: Line description: An line chart visually displays data points connected by straight lines, illustrating trends or relationships over a continuous axis. +source: apps/www/src/lib/registry/default/ui/chart-line label: Alpha --- @@ -20,22 +21,8 @@ label: Alpha npx shadcn-vue@latest add chart-line ``` -### Update `css` +### Setup -Add the following tooltip styling to your `tailwind.css` file: - -```css -@layer base { - :root { - /* ... */ - --vis-secondary-color: 160 81% 40%; - --vis-tooltip-background-color: none !important; - --vis-tooltip-border-color: none !important; - --vis-tooltip-text-color: none !important; - --vis-tooltip-shadow-color: none !important; - --vis-tooltip-backdrop-filter: none !important; - --vis-tooltip-padding: none !important; - } -``` +Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. diff --git a/apps/www/src/examples/dashboard/components/Overview.vue b/apps/www/src/examples/dashboard/components/Overview.vue index cc2f4a6e..0e932772 100644 --- a/apps/www/src/examples/dashboard/components/Overview.vue +++ b/apps/www/src/examples/dashboard/components/Overview.vue @@ -18,5 +18,5 @@ const data = [ diff --git a/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue b/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue index 16299e1b..8aebe955 100644 --- a/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue +++ b/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue @@ -1,5 +1,5 @@ \n\n\n" + "content": "\n\n\n" }, { "name": "index.ts", diff --git a/apps/www/src/public/registry/styles/new-york/chart-bar.json b/apps/www/src/public/registry/styles/new-york/chart-bar.json index bcfdac88..48d14ce4 100644 --- a/apps/www/src/public/registry/styles/new-york/chart-bar.json +++ b/apps/www/src/public/registry/styles/new-york/chart-bar.json @@ -12,7 +12,7 @@ "files": [ { "name": "BarChart.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "index.ts",