@matthieumordrel/chart-studio 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/core/colors.mjs +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -364,6 +364,30 @@ If you are importing the package source directly in a local playground or monore
|
|
|
364
364
|
|
|
365
365
|
If your app already uses shadcn-style tokens, also make sure tokens such as `background`, `foreground`, `muted`, `border`, `popover`, `primary`, `ring`, and optionally `chart-1` through `chart-5` are defined in your theme.
|
|
366
366
|
|
|
367
|
+
## On the Radar
|
|
368
|
+
|
|
369
|
+
These are known limitations and areas being considered for future versions. None of these are committed — they represent directions the library may grow based on real usage.
|
|
370
|
+
|
|
371
|
+
### Renderer flexibility
|
|
372
|
+
|
|
373
|
+
The UI layer currently only supports Recharts. If you want to use ECharts, Plotly, or another renderer, you can use the headless core but lose the built-in toolbar and canvas composition. A renderer adapter pattern for `<ChartCanvas>` could make the UI layer renderer-agnostic.
|
|
374
|
+
|
|
375
|
+
### Richer aggregation
|
|
376
|
+
|
|
377
|
+
The pipeline supports sum, avg, min, and max. Derived columns can access multiple fields of a single row (e.g. `row.revenue - row.cost`), but there is no support yet for metrics that depend on other rows or on aggregated results — things like "% of total", running totals, percentiles, or post-aggregation ratios (e.g. total revenue / total orders).
|
|
378
|
+
|
|
379
|
+
### Chart interactivity
|
|
380
|
+
|
|
381
|
+
There is currently no built-in support for drill-down, click-to-filter, brush selection, or linked charts. The headless state can be wired manually to achieve some of these, but first-class interactivity primitives would make this significantly easier.
|
|
382
|
+
|
|
383
|
+
### Multi-dataset composition
|
|
384
|
+
|
|
385
|
+
Each chart instance operates on a single flat dataset. Overlaying series from different schemas (e.g. revenue on the left Y-axis and headcount on the right) would require separate chart instances today. Dual-axis and cross-dataset composition are not yet supported.
|
|
386
|
+
|
|
387
|
+
### The double-call schema syntax
|
|
388
|
+
|
|
389
|
+
`defineChartSchema<Row>()()` uses a double function call as a workaround for TypeScript's lack of partial type argument inference. This lets you provide the row type explicitly while the column IDs are inferred automatically. It works well but can surprise newcomers — this will be revisited if TypeScript adds native support for partial inference.
|
|
390
|
+
|
|
367
391
|
## Release
|
|
368
392
|
|
|
369
393
|
- `bun run release:check`
|
package/dist/core/colors.mjs
CHANGED
|
@@ -20,11 +20,11 @@ const FALLBACK_COLORS = [
|
|
|
20
20
|
];
|
|
21
21
|
/** Shadcn chart CSS variables (5 colors) with safe fallbacks. */
|
|
22
22
|
const SHADCN_CHART_COLORS = [
|
|
23
|
-
`
|
|
24
|
-
`
|
|
25
|
-
`
|
|
26
|
-
`
|
|
27
|
-
`
|
|
23
|
+
`var(--chart-1, var(--cs-chart-1, hsl(245 72% 57%)))`,
|
|
24
|
+
`var(--chart-2, var(--cs-chart-2, hsl(271 72% 55%)))`,
|
|
25
|
+
`var(--chart-3, var(--cs-chart-3, hsl(330 68% 54%)))`,
|
|
26
|
+
`var(--chart-4, var(--cs-chart-4, hsl(170 65% 38%)))`,
|
|
27
|
+
`var(--chart-5, var(--cs-chart-5, hsl(30 90% 54%)))`
|
|
28
28
|
];
|
|
29
29
|
/**
|
|
30
30
|
* Get a color for the Nth series.
|