shadcn-vue

Are you an AI agent?

Chart blocks for shadcn-vue and Nuxt. All blocks on one page ↗

BLOCKS
01 — INSTALL
npx shadcn-vue@latest add @wick-charts/chart-candlestick
02 — USE IT
The block draws demo data. To draw yours, replace it in ChartCandlestick.vue and pass your array to <CandlestickSeries>. Data format: Candlestick.
<script setup lang="ts">
import ChartCandlestick from '@/components/ChartCandlestick.vue';
</script>
 
<template>
<ChartCandlestick />
</template>
03 — BUILD YOUR OWN CHART
Add the chart container of the blocks: npx shadcn-vue@latest add @wick-charts/wick-chart. It takes the colors and dark mode of your shadcn-vue theme. Set the size with classes, the default is aspect-video.
<script setup lang="ts">
import { LineSeries, TimeAxis, type TimePoint, Tooltip, YAxis } from '@wick-charts/vue';
 
import { WickChart } from '@/components/ui/wick-chart';
 
defineProps<{ data: TimePoint[] }>();
</script>
 
<template>
<WickChart class="aspect-auto h-[250px]">
<LineSeries :data="data" />
<YAxis />
<TimeAxis />
<Tooltip />
</WickChart>
</template>
04 — UPGRADE
After an upgrade of @wick-charts/*, re-add the theme hook: the CLI keeps an installed file unless you pass --overwrite. Re-add a block the same way to take its fixes; this replaces your edits to it.
npx shadcn-vue@latest add @wick-charts/wick-theme --overwrite
Chart colors: