Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { Chart, ChartFrame, getCartesianScales, toSeriesData, useSeriesSelection, type ChartConfig } from '@/components/ui/preskok-ui/chart'import { scaleLinear } from '@tanstack/charts/scales/linear'const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']const data = [ { index: 0, desktop: 186, mobile: 80 }, { index: 1, desktop: 305, mobile: 200 }, { index: 2, desktop: 237, mobile: 120 }, { index: 3, desktop: 73, mobile: 190 }, { index: 4, desktop: 209, mobile: 130 }, { index: 5, desktop: 214, mobile: 140 },]const config = { desktop: { label: 'Desktop', color: 'var(--chart-1)' }, mobile: { label: 'Mobile', color: 'var(--chart-2)' },} satisfies ChartConfigconst axes = getCartesianScales({ categoryAxis: { tickFormatter: (value: number) => months[value] ?? String(value), tickStrategy: 'all', }, categoryScale: scaleLinear, data, dataKey: 'index', grid: 'visible', valueFormatter: (value: number) => String(value),})const definition = { data: toSeriesData({ config, data, dataKey: 'index' }), marks: [], margin: axes.margin, scales: { x: axes.category, y: axes.value, },} as anyexport default function ChartDemo() { const [selectedSeries, selectSeries] = useSeriesSelection() return ( <ChartFrame className='w-full max-w-lg' config={config} selectedSeries={selectedSeries} onSelectedSeriesChange={selectSeries} > <Chart ariaLabel='Visitors by month' config={config} definition={definition} /> </ChartFrame> )}