diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts index 24997ac2..1f211383 100644 --- a/apps/www/.vitepress/theme/config/docs.ts +++ b/apps/www/.vitepress/theme/config/docs.ts @@ -121,32 +121,6 @@ export const docsConfig: DocsConfig = { }, ], }, - { - title: 'Charts', - label: 'Alpha', - items: [ - { - title: 'Guide', - href: '/docs/charts/guide', - }, - { - title: 'Area', - href: '/docs/charts/area', - }, - { - title: 'Line', - href: '/docs/charts/line', - }, - { - title: 'Bar', - href: '/docs/charts/bar', - }, - { - title: 'Donut', - href: '/docs/charts/donut', - }, - ], - }, { title: 'Extended', items: [ @@ -155,6 +129,12 @@ export const docsConfig: DocsConfig = { href: '/docs/components/auto-form', items: [], }, + { + title: 'Charts', + href: '/docs/charts', + label: 'Alpha', + items: [], + }, ], }, { diff --git a/apps/www/package.json b/apps/www/package.json index 1dea4c31..dd480705 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -51,6 +51,7 @@ "@iconify-json/radix-icons": "^1.1.14", "@iconify-json/ri": "^1.1.18", "@iconify-json/simple-icons": "^1.1.94", + "@iconify-json/solar": "^1.1.9", "@iconify-json/tabler": "^1.1.106", "@iconify/vue": "^4.1.2", "@oxc-parser/wasm": "^0.1.0", diff --git a/apps/www/src/content/docs/charts/guide.md b/apps/www/src/content/docs/charts.md similarity index 66% rename from apps/www/src/content/docs/charts/guide.md rename to apps/www/src/content/docs/charts.md index 82b0e4e9..06a55176 100644 --- a/apps/www/src/content/docs/charts/guide.md +++ b/apps/www/src/content/docs/charts.md @@ -1,15 +1,46 @@ --- -title: Guide -description: A simple guide to help setup chart components. +title: Charts +description: Versatile visualization tool, allowing users to represent data using various types of charts for effective analysis. label: Alpha --- + + Only works with Vue >3.3 `Charts` components were built on top of [Unovis](https://unovis.dev/) (a modular data visualization framework), and inspired by [tremor](https://www.tremor.so). +## Chart type + +
+ + +

Area

+
+ + + +

Line

+
+ + + +

Bar

+
+ + + +

Donut

+
+
+ ## Installation diff --git a/apps/www/src/content/docs/charts/area.md b/apps/www/src/content/docs/charts/area.md index 6c10af86..da04b680 100644 --- a/apps/www/src/content/docs/charts/area.md +++ b/apps/www/src/content/docs/charts/area.md @@ -23,7 +23,7 @@ npx shadcn-vue@latest add chart-area ### Setup -Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. +Follow the [guide](/docs/charts.html#installation) to complete the setup. @@ -41,6 +41,6 @@ We can turn the chart into sparkline chart by hiding axis, gridline and legends. ### Custom Tooltip -If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts/guide.html#custom-tooltip). +If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts.html#custom-tooltip). diff --git a/apps/www/src/content/docs/charts/bar.md b/apps/www/src/content/docs/charts/bar.md index ddce7edf..fa0f8029 100644 --- a/apps/www/src/content/docs/charts/bar.md +++ b/apps/www/src/content/docs/charts/bar.md @@ -23,7 +23,7 @@ npx shadcn-vue@latest add chart-bar ### Setup -Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. +Follow the [guide](/docs/charts.html#installation) to complete the setup. @@ -45,6 +45,6 @@ You can stack the bar chart by settings prop `type` to `stacked`. ### Custom Tooltip -If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts/guide.html#custom-tooltip). +If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts.html#custom-tooltip). diff --git a/apps/www/src/content/docs/charts/donut.md b/apps/www/src/content/docs/charts/donut.md index 607c45b7..2ed86267 100644 --- a/apps/www/src/content/docs/charts/donut.md +++ b/apps/www/src/content/docs/charts/donut.md @@ -23,7 +23,7 @@ npx shadcn-vue@latest add chart-donut ### Setup -Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. +Follow the [guide](/docs/charts.html#installation) to complete the setup. @@ -47,6 +47,6 @@ We generate colors automatically based on the primary and secondary color and as ### Custom Tooltip -If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts/guide.html#custom-tooltip). +If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts.html#custom-tooltip). diff --git a/apps/www/src/content/docs/charts/line.md b/apps/www/src/content/docs/charts/line.md index 7e965ad3..39cf6f3a 100644 --- a/apps/www/src/content/docs/charts/line.md +++ b/apps/www/src/content/docs/charts/line.md @@ -23,7 +23,7 @@ npx shadcn-vue@latest add chart-line ### Setup -Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. +Follow the [guide](/docs/charts.html#installation) to complete the setup. @@ -41,6 +41,6 @@ We can turn the chart into sparkline chart by hiding axis, gridline and legends. ### Custom Tooltip -If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts/guide.html#custom-tooltip). +If you want to render custom tooltip, you can easily pass in a custom component. Refer to prop definition [here](/docs/charts.html#custom-tooltip). diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 25657a96..91eae6e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -141,6 +141,9 @@ importers: '@iconify-json/simple-icons': specifier: ^1.1.94 version: 1.1.100 + '@iconify-json/solar': + specifier: ^1.1.9 + version: 1.1.9 '@iconify-json/tabler': specifier: ^1.1.106 version: 1.1.110 @@ -1292,6 +1295,9 @@ packages: '@iconify-json/simple-icons@1.1.100': resolution: {integrity: sha512-PoRbJcGMv2IQ0LMotLBFIiDhSdR3LjNFo/c4T2vCJjOl24I/DMtWt4ccUWEcAA5GJCt4/LTi8zlfztAeh1Jedw==} + '@iconify-json/solar@1.1.9': + resolution: {integrity: sha512-BcWzZqA02BiQduYizqU/J4v4RNs0MkjZUGpMbejpozH8YQSt3+S/LfV6zfVRonx/2DhXTVSqiLa1abDRAZtojQ==} + '@iconify-json/tabler@1.1.110': resolution: {integrity: sha512-+0TbyNeQpFI2r+bjtbazGrpGskI3c9NTii/6HhWTS+/d5+PiLs6+wWJW0M9AU2ykew7zdMKB2WtyczFyjYzZIQ==} @@ -8398,6 +8404,10 @@ snapshots: dependencies: '@iconify/types': 2.0.0 + '@iconify-json/solar@1.1.9': + dependencies: + '@iconify/types': 2.0.0 + '@iconify-json/tabler@1.1.110': dependencies: '@iconify/types': 2.0.0