From cf97277284410e238ca4831f960088fe7bb07a73 Mon Sep 17 00:00:00 2001 From: Saeid Zareie Date: Tue, 16 Jul 2024 09:51:59 +0330 Subject: [PATCH] feat: adding chart pages --- .../theme/components/charts/ChartDisplay.vue | 23 ++ .../theme/components/charts/Charts.vue | 327 ++++++++++++++++++ apps/www/.vitepress/theme/config/docs.ts | 17 +- .../.vitepress/theme/layout/ChartsLayout.vue | 32 ++ apps/www/src/content/charts.md | 9 + apps/www/src/content/themes.md | 2 +- .../new-york/block/ChartAreaStacked.vue | 42 +++ .../new-york/ui/chart-area/AreaChart.vue | 2 +- .../new-york/ui/chart/ChartContainer.vue | 16 + 9 files changed, 459 insertions(+), 11 deletions(-) create mode 100644 apps/www/.vitepress/theme/components/charts/ChartDisplay.vue create mode 100644 apps/www/.vitepress/theme/components/charts/Charts.vue create mode 100644 apps/www/.vitepress/theme/layout/ChartsLayout.vue create mode 100644 apps/www/src/content/charts.md create mode 100644 apps/www/src/lib/registry/new-york/block/ChartAreaStacked.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/ChartContainer.vue diff --git a/apps/www/.vitepress/theme/components/charts/ChartDisplay.vue b/apps/www/.vitepress/theme/components/charts/ChartDisplay.vue new file mode 100644 index 000000000..c4366cebc --- /dev/null +++ b/apps/www/.vitepress/theme/components/charts/ChartDisplay.vue @@ -0,0 +1,23 @@ + + + diff --git a/apps/www/.vitepress/theme/components/charts/Charts.vue b/apps/www/.vitepress/theme/components/charts/Charts.vue new file mode 100644 index 000000000..6661346ff --- /dev/null +++ b/apps/www/.vitepress/theme/components/charts/Charts.vue @@ -0,0 +1,327 @@ + + + diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts index 698dcc4b7..0e43a8792 100644 --- a/apps/www/.vitepress/theme/config/docs.ts +++ b/apps/www/.vitepress/theme/config/docs.ts @@ -31,21 +31,20 @@ export const docsConfig: DocsConfig = { href: '/docs/components/accordion', }, { - title: 'Themes', - href: '/themes', + title: 'Blocks', + href: '/blocks', }, { - title: 'Examples', - href: '/examples/mail', + title: 'Charts', + href: '/charts', }, { - title: 'Blocks', - href: '/blocks', + title: 'Themes', + href: '/themes', }, { - title: 'GitHub', - href: 'https://github.com/radix-vue/shadcn-vue', - external: true, + title: 'Examples', + href: '/examples/mail', }, ], sidebarNav: [ diff --git a/apps/www/.vitepress/theme/layout/ChartsLayout.vue b/apps/www/.vitepress/theme/layout/ChartsLayout.vue new file mode 100644 index 000000000..71dafa243 --- /dev/null +++ b/apps/www/.vitepress/theme/layout/ChartsLayout.vue @@ -0,0 +1,32 @@ + + + diff --git a/apps/www/src/content/charts.md b/apps/www/src/content/charts.md new file mode 100644 index 000000000..c6db5b631 --- /dev/null +++ b/apps/www/src/content/charts.md @@ -0,0 +1,9 @@ +--- +title: Beautiful Charts +--- + + + + diff --git a/apps/www/src/content/themes.md b/apps/www/src/content/themes.md index 6aa49b26e..3df3823ae 100644 --- a/apps/www/src/content/themes.md +++ b/apps/www/src/content/themes.md @@ -1,5 +1,5 @@ --- -title: Theming - shadcn-vue +title: Theming --- + + diff --git a/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue b/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue index be913ef37..894d1a13e 100644 --- a/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue +++ b/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue @@ -61,7 +61,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {