semiotic 3.4.0 → 3.4.1
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/CLAUDE.md +16 -3
- package/ai/schema.json +42 -1
- package/ai/system-prompt.md +4 -0
- package/dist/components/Annotation.d.ts +42 -2
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ContextLayout.d.ts +1 -1
- package/dist/components/DataSummaryContext.d.ts +1 -1
- package/dist/components/DetailsPanel.d.ts +3 -2
- package/dist/components/Legend.d.ts +2 -3
- package/dist/components/LinkedCharts.d.ts +1 -1
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -3
- package/dist/components/charts/geo/ChoroplethMap.d.ts +4 -4
- package/dist/components/charts/geo/DistanceCartogram.d.ts +5 -4
- package/dist/components/charts/geo/FlowMap.d.ts +4 -4
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +4 -3
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/charts/network/ChordDiagram.d.ts +4 -3
- package/dist/components/charts/network/CirclePack.d.ts +3 -3
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +3 -2
- package/dist/components/charts/network/OrbitDiagram.d.ts +6 -5
- package/dist/components/charts/network/SankeyDiagram.d.ts +4 -3
- package/dist/components/charts/network/TreeDiagram.d.ts +3 -3
- package/dist/components/charts/network/Treemap.d.ts +3 -3
- package/dist/components/charts/ordinal/BarChart.d.ts +24 -4
- package/dist/components/charts/ordinal/BoxPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/DonutChart.d.ts +4 -3
- package/dist/components/charts/ordinal/DotPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/FunnelChart.d.ts +4 -3
- package/dist/components/charts/ordinal/GaugeChart.d.ts +2 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
- package/dist/components/charts/ordinal/LikertChart.d.ts +4 -3
- package/dist/components/charts/ordinal/PieChart.d.ts +4 -3
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +4 -3
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -3
- package/dist/components/charts/ordinal/ViolinPlot.d.ts +4 -3
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -6
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -6
- package/dist/components/charts/shared/ChartError.d.ts +1 -2
- package/dist/components/charts/shared/annotationResolvers.d.ts +4 -3
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/colorUtils.d.ts +4 -3
- package/dist/components/charts/shared/datumTypes.d.ts +20 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +2 -7
- package/dist/components/charts/shared/formatUtils.d.ts +4 -2
- package/dist/components/charts/shared/hooks.d.ts +27 -23
- package/dist/components/charts/shared/legendUtils.d.ts +3 -2
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +43 -0
- package/dist/components/charts/shared/networkUtils.d.ts +7 -6
- package/dist/components/charts/shared/selectionUtils.d.ts +5 -4
- package/dist/components/charts/shared/statisticalOverlays.d.ts +14 -26
- package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +2 -2
- package/dist/components/charts/shared/statsTooltip.d.ts +3 -2
- package/dist/components/charts/shared/tooltipUtils.d.ts +7 -6
- package/dist/components/charts/shared/types.d.ts +22 -13
- package/dist/components/charts/shared/useChartSetup.d.ts +7 -6
- package/dist/components/charts/shared/useLikertAggregation.d.ts +18 -7
- package/dist/components/charts/shared/useOrdinalStreaming.d.ts +3 -2
- package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -1
- package/dist/components/charts/shared/validateChartData.d.ts +2 -1
- package/dist/components/charts/shared/validateProps.d.ts +2 -8
- package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +4 -3
- package/dist/components/charts/xy/BubbleChart.d.ts +4 -3
- package/dist/components/charts/xy/CandlestickChart.d.ts +47 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -3
- package/dist/components/charts/xy/Heatmap.d.ts +12 -7
- package/dist/components/charts/xy/LineChart.d.ts +4 -3
- package/dist/components/charts/xy/MinimapChart.d.ts +4 -4
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +5 -4
- package/dist/components/charts/xy/QuadrantChart.d.ts +4 -3
- package/dist/components/charts/xy/Scatterplot.d.ts +4 -3
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +3 -3
- package/dist/components/charts/xy/StackedAreaChart.d.ts +4 -3
- package/dist/components/data/transforms.d.ts +8 -7
- package/dist/components/export/chartConfig.d.ts +4 -3
- package/dist/components/geo/mergeData.d.ts +2 -1
- package/dist/components/realtime/BinAccumulator.d.ts +3 -2
- package/dist/components/realtime/renderers/types.d.ts +2 -1
- package/dist/components/realtime/renderers/waterfallRenderer.d.ts +2 -1
- package/dist/components/realtime/types.d.ts +20 -16
- package/dist/components/semiotic-themes.d.ts +2 -1
- package/dist/components/semiotic-xy.d.ts +2 -0
- package/dist/components/semiotic.d.ts +3 -3
- package/dist/components/server/animatedGif.d.ts +4 -18
- package/dist/components/server/renderToStaticSVG.d.ts +5 -4
- package/dist/components/server/serverChartConfigs.d.ts +2 -10
- package/dist/components/server/staticAnnotations.d.ts +2 -1
- package/dist/components/server/staticLegend.d.ts +2 -1
- package/dist/components/store/ObservationStore.d.ts +4 -3
- package/dist/components/store/SelectionStore.d.ts +3 -8
- package/dist/components/store/ThemeStore.d.ts +32 -4
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/useSelection.d.ts +6 -5
- package/dist/components/stream/AccessibleDataTable.d.ts +5 -5
- package/dist/components/stream/CanvasHitTester.d.ts +2 -1
- package/dist/components/stream/DataSourceAdapter.d.ts +2 -1
- package/dist/components/stream/FocusRing.d.ts +1 -2
- package/dist/components/stream/GeoParticlePool.d.ts +2 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +7 -6
- package/dist/components/stream/MarginalGraphics.d.ts +1 -2
- package/dist/components/stream/NetworkPipelineStore.d.ts +3 -2
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
- package/dist/components/stream/OrdinalPipelineStore.d.ts +6 -5
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
- package/dist/components/stream/PipelineStore.d.ts +63 -28
- package/dist/components/stream/SVGOverlay.d.ts +10 -10
- package/dist/components/stream/SceneGraph.d.ts +6 -5
- package/dist/components/stream/StreamGeoFrame.d.ts +2 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +2 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +2 -1
- package/dist/components/stream/StreamXYFrame.d.ts +2 -1
- package/dist/components/stream/XYBrushOverlay.d.ts +1 -21
- package/dist/components/stream/devDataAccessWarning.d.ts +2 -11
- package/dist/components/stream/geoTypes.d.ts +25 -18
- package/dist/components/stream/hoverUtils.d.ts +2 -1
- package/dist/components/stream/layouts/hierarchySceneBuilders.d.ts +4 -3
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +4 -3
- package/dist/components/stream/networkTypes.d.ts +33 -28
- package/dist/components/stream/ordinalSceneBuilders/barFunnelScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/barScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/connectorScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/statisticalScene.d.ts +4 -4
- package/dist/components/stream/ordinalSceneBuilders/swimlaneScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/timelineScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +9 -8
- package/dist/components/stream/ordinalTypes.d.ts +54 -22
- package/dist/components/stream/pipelineDecay.d.ts +2 -1
- package/dist/components/stream/pipelinePulse.d.ts +2 -1
- package/dist/components/stream/pipelineTransitions.d.ts +16 -4
- package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
- package/dist/components/stream/types.d.ts +45 -8
- package/dist/components/stream/xySceneBuilders/areaScene.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/barScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/boundsScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/emitPointNodes.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/lineScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +35 -26
- package/dist/components/stream/xySceneBuilders/waterfallScene.d.ts +2 -1
- package/dist/components/types/marginType.d.ts +15 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-statisticalOverlays-Ckd_jM8z.js +1 -0
- package/dist/semiotic-themes.d.ts +2 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +2 -0
- package/dist/semiotic.d.ts +3 -3
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/test-utils/canvasMock.d.ts +10 -2
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +38 -31
- package/dist/components/types/annotationTypes.d.ts +0 -145
- package/dist/components/types/generalTypes.d.ts +0 -241
- package/dist/components/types/interactionTypes.d.ts +0 -72
- package/dist/components/types/networkTypes.d.ts +0 -174
- package/dist/components/types/ordinalTypes.d.ts +0 -112
- package/dist/semiotic-statisticalOverlays-DGX_WWc5.js +0 -1
package/CLAUDE.md
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
- Every HOC accepts `frameProps` for pass-through. TypeScript `strict: true`. Every HOC has error boundary + dev-mode validation.
|
|
13
13
|
|
|
14
14
|
## Common Props (all HOCs)
|
|
15
|
-
`title`, `description` (aria-label), `summary` (sr-only), `width` (600), `height` (400), `responsiveWidth`, `responsiveHeight`, `margin`, `className`, `color` (uniform fill), `enableHover` (true), `tooltip` (boolean | "multi" | function | config object), `showLegend`, `showGrid` (false), `frameProps`, `onObservation`, `onClick`, `chartId`, `loading` (false), `emptyContent`, `legendInteraction` ("none"|"highlight"|"isolate"), `legendPosition` ("right"|"left"|"top"|"bottom"), `emphasis` ("primary"|"secondary"), `annotations` (array), `accessibleTable` (true), `hoverHighlight` (boolean — dims non-hovered series, requires `colorBy`), `hoverRadius` (30), `animate` (boolean | { duration?, easing?, intro? } — animated intro on first render + smooth transitions on data change; intro defaults to true when animate is enabled)
|
|
15
|
+
`title`, `description` (aria-label), `summary` (sr-only), `width` (600), `height` (400), `responsiveWidth`, `responsiveHeight`, `margin`, `className`, `color` (uniform fill), `stroke` (uniform stroke color — CSS var OK), `strokeWidth` (uniform stroke width in px), `opacity` (uniform 0–1 opacity), `enableHover` (true), `tooltip` (boolean | "multi" | function | config object), `showLegend`, `showGrid` (false), `frameProps`, `onObservation`, `onClick`, `chartId`, `loading` (false), `emptyContent`, `legendInteraction` ("none"|"highlight"|"isolate"), `legendPosition` ("right"|"left"|"top"|"bottom"), `emphasis` ("primary"|"secondary"), `annotations` (array), `accessibleTable` (true), `hoverHighlight` (boolean — dims non-hovered series, requires `colorBy`), `hoverRadius` (30), `animate` (boolean | { duration?, easing?, intro? } — animated intro on first render + smooth transitions on data change; intro defaults to true when animate is enabled)
|
|
16
|
+
|
|
17
|
+
**Primitive styling props** (`color`, `stroke`, `strokeWidth`, `opacity`) apply to any shape the chart draws (bars, circles, lines, wedges, rects). Precedence: top-level prop > `frameProps.*Style` function return > HOC base > theme fallback. Use CSS variables (`stroke="var(--semiotic-border)"`) for theme-aware, cascade-overridable styling. For per-datum customization, keep using the function-form `frameProps.pieceStyle` / `pointStyle` / `lineStyle` etc. — the top-level prop overlays on top of whatever the function returns.
|
|
16
18
|
|
|
17
19
|
`onClick` receives `(datum, { x, y })`. `onObservation` receives `{ type, datum?, x?, y?, timestamp, chartType, chartId }`.
|
|
18
20
|
|
|
@@ -29,10 +31,11 @@
|
|
|
29
31
|
**Heatmap** — `data`, `xAccessor`, `yAccessor`, `valueAccessor`, `colorScheme`, `showValues`, `cellBorderColor`
|
|
30
32
|
**ScatterplotMatrix** — `data`, `fields` (array of numeric field names for grid)
|
|
31
33
|
**MinimapChart** — Overview + detail with linked zoom. Wraps an XY chart.
|
|
34
|
+
**CandlestickChart** — `data`, `xAccessor`, `highAccessor` (req), `lowAccessor` (req), `openAccessor` + `closeAccessor` (optional). With all four: OHLC bars. With only high/low: degrades to a range chart. `candlestickStyle` ({ upColor, downColor, wickColor, rangeColor, bodyWidth, wickWidth }). Honors `mode` (primary/context/sparkline).
|
|
32
35
|
|
|
33
36
|
## Ordinal Charts (`semiotic/ordinal`)
|
|
34
37
|
|
|
35
|
-
**BarChart** — `data`, `categoryAccessor`, `valueAccessor`, `orientation`, `colorBy`, `sort`, `barPadding` (40)
|
|
38
|
+
**BarChart** — `data`, `categoryAccessor`, `valueAccessor`, `orientation`, `colorBy`, `sort`, `barPadding` (40), `roundedTop`, `gradientFill` (`true` | `{topOpacity, bottomOpacity}` | `{colorStops}` — same API as AreaChart; runs tip→base)
|
|
36
39
|
**StackedBarChart** — + `stackBy` (required), `normalize`, `sort` (default false — insertion order)
|
|
37
40
|
**GroupedBarChart** — + `groupBy` (required), `barPadding` (60), `sort` (default false — insertion order)
|
|
38
41
|
**SwarmPlot** — `colorBy`, `sizeBy`, `pointRadius`, `pointOpacity`
|
|
@@ -155,7 +158,7 @@ All HOCs accept `annotations` (array). Coordinates use data field names.
|
|
|
155
158
|
|
|
156
159
|
## Theming
|
|
157
160
|
|
|
158
|
-
CSS custom properties: `--semiotic-bg`, `--semiotic-text`, `--semiotic-text-secondary`, `--semiotic-border`, `--semiotic-grid`, `--semiotic-primary`, `--semiotic-focus`, `--semiotic-font-family`, `--semiotic-annotation-color`, `--semiotic-legend-font-size`, `--semiotic-title-font-size`, `--semiotic-tick-font-family`, `--semiotic-tooltip-bg`/`text`/`radius`/`font-size`/`shadow`.
|
|
161
|
+
CSS custom properties: `--semiotic-bg`, `--semiotic-text`, `--semiotic-text-secondary`, `--semiotic-border`, `--semiotic-grid`, `--semiotic-primary`, `--semiotic-secondary`, `--semiotic-surface`, `--semiotic-success`, `--semiotic-danger`, `--semiotic-warning`, `--semiotic-error`, `--semiotic-info`, `--semiotic-focus`, `--semiotic-font-family`, `--semiotic-annotation-color`, `--semiotic-legend-font-size`, `--semiotic-title-font-size`, `--semiotic-tick-font-family`, `--semiotic-tooltip-bg`/`text`/`radius`/`font-size`/`shadow`.
|
|
159
162
|
|
|
160
163
|
```jsx
|
|
161
164
|
<ThemeProvider theme="tufte"> {/* Named preset */}
|
|
@@ -166,6 +169,16 @@ CSS custom properties: `--semiotic-bg`, `--semiotic-text`, `--semiotic-text-seco
|
|
|
166
169
|
Presets: `light`, `dark`, `high-contrast`, `pastels`(-dark), `bi-tool`(-dark), `italian`(-dark), `tufte`(-dark), `journalist`(-dark), `playful`(-dark), `carbon`(-dark).
|
|
167
170
|
Serialization: `themeToCSS(theme, selector)`, `themeToTokens(theme)`, `resolveThemePreset(name)`.
|
|
168
171
|
|
|
172
|
+
**Semantic status roles** (on every preset): `colors.success`, `colors.danger`, `colors.warning`, `colors.error`, `colors.info`, plus `colors.secondary` and `colors.surface`. Each emits as a `--semiotic-{role}` CSS custom property. Use for status-driven charts: `<Waterfall positiveColor="var(--semiotic-success)" negativeColor="var(--semiotic-danger)" />`, `<Swimlane color="var(--semiotic-warning)" />`, bar stroke delineation `<RealtimeHistogram stroke="var(--semiotic-border)" />`, status annotations.
|
|
173
|
+
|
|
174
|
+
**Scoped CSS cascade override** (per-subtree, no ThemeProvider needed):
|
|
175
|
+
```jsx
|
|
176
|
+
<div style={{ "--semiotic-danger": "#4b0082" }}>
|
|
177
|
+
{/* every chart below inherits this danger color via canvas CSS-var lookup */}
|
|
178
|
+
</div>
|
|
179
|
+
```
|
|
180
|
+
Canvas scene builders read CSS variables via `getComputedStyle` on the canvas DOM ancestor, so standard CSS cascade rules apply even though rendering is canvas-based. Use CSS vars for **single-role** overrides; use a nested `ThemeProvider` for **array/scale** overrides (categorical palette, sequential/diverging scheme name).
|
|
181
|
+
|
|
169
182
|
## AI Features
|
|
170
183
|
`onObservation`/`useChartObserver`, `toConfig`/`fromConfig`/`toURL`/`fromURL`/`copyConfig`/`configToJSX`, `validateProps(component, props)`, `diagnoseConfig(component, props)`, `exportChart(div, { format })`, `npx semiotic-ai --doctor`
|
|
171
184
|
|
package/ai/schema.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"name": "semiotic",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.1",
|
|
5
5
|
"description": "React data visualization library for charts, networks, and beyond",
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
@@ -932,6 +932,47 @@
|
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
},
|
|
935
|
+
{
|
|
936
|
+
"type": "function",
|
|
937
|
+
"function": {
|
|
938
|
+
"name": "CandlestickChart",
|
|
939
|
+
"description": "OHLC candlestick bars, or a range chart when open/close are omitted. Honors mode (primary/context/sparkline). Range variant degrades cleanly: endpoint dots + wick, sized against canvas height so sparkline rows don't render marble-sized dots.",
|
|
940
|
+
"parameters": {
|
|
941
|
+
"type": "object",
|
|
942
|
+
"properties": {
|
|
943
|
+
"data": { "type": "array", "items": { "type": "object" } },
|
|
944
|
+
"xAccessor": { "type": "string", "default": "x" },
|
|
945
|
+
"highAccessor": { "type": "string", "default": "high", "description": "Required. Upper bound (candlestick high or range top)." },
|
|
946
|
+
"lowAccessor": { "type": "string", "default": "low", "description": "Required. Lower bound (candlestick low or range bottom)." },
|
|
947
|
+
"openAccessor": { "type": "string", "description": "Optional. Pair with closeAccessor for OHLC; omit both to render a range chart." },
|
|
948
|
+
"closeAccessor": { "type": "string", "description": "Optional. See openAccessor." },
|
|
949
|
+
"candlestickStyle": {
|
|
950
|
+
"type": "object",
|
|
951
|
+
"description": "Style overrides.",
|
|
952
|
+
"properties": {
|
|
953
|
+
"upColor": { "type": "string" },
|
|
954
|
+
"downColor": { "type": "string" },
|
|
955
|
+
"wickColor": { "type": "string" },
|
|
956
|
+
"wickWidth": { "type": "number" },
|
|
957
|
+
"bodyWidth": { "type": "number" },
|
|
958
|
+
"rangeColor": { "type": "string", "description": "Color for range-mode dots and wick." }
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
"mode": { "type": "string", "enum": ["primary", "context", "sparkline"] },
|
|
962
|
+
"xLabel": { "type": "string" },
|
|
963
|
+
"yLabel": { "type": "string" },
|
|
964
|
+
"title": { "type": "string" },
|
|
965
|
+
"width": { "type": "number", "default": 600 },
|
|
966
|
+
"height": { "type": "number", "default": 400 },
|
|
967
|
+
"enableHover": { "type": "boolean", "default": true },
|
|
968
|
+
"showGrid": { "type": "boolean", "default": false },
|
|
969
|
+
"margin": { "type": "object" },
|
|
970
|
+
"annotations": { "type": "array", "items": { "type": "object" } }
|
|
971
|
+
},
|
|
972
|
+
"required": ["highAccessor", "lowAccessor"]
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
},
|
|
935
976
|
{
|
|
936
977
|
"type": "function",
|
|
937
978
|
"function": {
|
package/ai/system-prompt.md
CHANGED
|
@@ -109,6 +109,10 @@ Or use ThemeProvider with 15 named presets: `<ThemeProvider theme="tufte">`, `"t
|
|
|
109
109
|
|
|
110
110
|
`semiotic/themes` entry point: `themeToCSS(theme, selector)` generates CSS string, `themeToTokens(theme)` generates DTCG design tokens, `resolveThemePreset("tufte")` returns theme object by name. Theme objects: `TUFTE_LIGHT`, `TUFTE_DARK`, `PASTELS_LIGHT`, `BI_TOOL_LIGHT`, `ITALIAN_LIGHT`, `JOURNALIST_LIGHT`, `PLAYFUL_LIGHT`, etc.
|
|
111
111
|
|
|
112
|
+
**Semantic status roles**: Every preset defines `colors.success`, `colors.danger`, `colors.warning`, `colors.error`, `colors.info`, plus `colors.secondary` and `colors.surface`. Each emits as a `--semiotic-{role}` CSS custom property via ThemeProvider. Use for status-driven charts: `<Waterfall positiveColor="var(--semiotic-success)" negativeColor="var(--semiotic-danger)" />`, bar stroke delineation `<RealtimeHistogram stroke="var(--semiotic-border)" />`, status annotations.
|
|
113
|
+
|
|
114
|
+
**Scoped CSS cascade override** (per-subtree, no ThemeProvider needed): wrap in `<div style={{ "--semiotic-danger": "#c00" }}>` — every chart beneath inherits the override via canvas CSS-var lookup (`getComputedStyle` on the canvas's DOM ancestor). Use CSS vars for **single-role** overrides, nested `ThemeProvider` for **array/scale** overrides.
|
|
115
|
+
|
|
112
116
|
`COLOR_BLIND_SAFE_CATEGORICAL` — 8-color accessible palette (Wong 2011). Import from `semiotic`.
|
|
113
117
|
|
|
114
118
|
## Key Patterns
|
|
@@ -1,3 +1,43 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/** Props for the single-annotation renderer. Consumed only by `SemioticAnnotation`
|
|
3
|
+
* below; the broader annotation API flows through the frame-level `annotations`
|
|
4
|
+
* array and its `svgAnnotationRules` hook. */
|
|
5
|
+
export interface AnnotationProps {
|
|
6
|
+
noteData: {
|
|
7
|
+
eventListeners?: Record<string, (e: React.SyntheticEvent) => void>;
|
|
8
|
+
events?: Record<string, (e: React.SyntheticEvent) => void>;
|
|
9
|
+
type: string;
|
|
10
|
+
screenCoordinates?: number[][];
|
|
11
|
+
/** When truthy, `screenCoordinates` is read as a sequence of anchor points
|
|
12
|
+
* and one annotation renders per coordinate with `nx`/`ny` shared. */
|
|
13
|
+
coordinates?: boolean;
|
|
14
|
+
noteHeight?: number | ((d: Record<string, unknown>) => number);
|
|
15
|
+
noteWidth?: number | ((d: Record<string, unknown>) => number);
|
|
16
|
+
x: number | number[];
|
|
17
|
+
y: number | number[];
|
|
18
|
+
nx?: number;
|
|
19
|
+
ny?: number;
|
|
20
|
+
dx?: number;
|
|
21
|
+
dy?: number;
|
|
22
|
+
note: {
|
|
23
|
+
label?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
wrap?: number;
|
|
26
|
+
orientation?: string;
|
|
27
|
+
align?: string;
|
|
28
|
+
noWrap?: boolean;
|
|
29
|
+
};
|
|
30
|
+
i?: number;
|
|
31
|
+
fixedPosition?: boolean;
|
|
32
|
+
label?: string;
|
|
33
|
+
connector?: {
|
|
34
|
+
end?: "arrow";
|
|
35
|
+
};
|
|
36
|
+
subject?: Record<string, unknown>;
|
|
37
|
+
color?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
disable?: string[];
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export default function SemioticAnnotation(props: AnnotationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -37,7 +37,7 @@ export interface CategoryColorProviderProps {
|
|
|
37
37
|
* </CategoryColorProvider>
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
export declare function CategoryColorProvider({ colors, categories, colorScheme, children, }: CategoryColorProviderProps):
|
|
40
|
+
export declare function CategoryColorProvider({ colors, categories, colorScheme, children, }: CategoryColorProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
export declare namespace CategoryColorProvider {
|
|
42
42
|
var displayName: string;
|
|
43
43
|
}
|
|
@@ -33,7 +33,7 @@ export interface ChartGridProps {
|
|
|
33
33
|
* </ChartGrid>
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export declare function ChartGrid({ children, columns, minCellWidth, gap, className, style, }: ChartGridProps):
|
|
36
|
+
export declare function ChartGrid({ children, columns, minCellWidth, gap, className, style, }: ChartGridProps): import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export declare namespace ChartGrid {
|
|
38
38
|
var displayName: string;
|
|
39
39
|
}
|
|
@@ -32,7 +32,7 @@ export interface ContextLayoutProps {
|
|
|
32
32
|
* </ContextLayout>
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export declare function ContextLayout({ children, context, position, contextSize, gap, className, style, }: ContextLayoutProps):
|
|
35
|
+
export declare function ContextLayout({ children, context, position, contextSize, gap, className, style, }: ContextLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
export declare namespace ContextLayout {
|
|
37
37
|
var displayName: string;
|
|
38
38
|
}
|
|
@@ -6,7 +6,7 @@ interface DataSummaryState {
|
|
|
6
6
|
}
|
|
7
7
|
export declare function DataSummaryProvider({ children }: {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
}):
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare function useDataSummary(): DataSummaryState | null;
|
|
11
11
|
export declare function useDataSummaryToggle(): (() => void) | null;
|
|
12
12
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "./charts/shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { ChartObservation, ClickObservation } from "./store/ObservationStore";
|
|
3
4
|
export interface DetailsPanelProps {
|
|
@@ -5,7 +6,7 @@ export interface DetailsPanelProps {
|
|
|
5
6
|
* Render function receiving the clicked datum and the full observation.
|
|
6
7
|
* Return null to hide the panel for a given datum.
|
|
7
8
|
*/
|
|
8
|
-
children: (datum:
|
|
9
|
+
children: (datum: Datum, observation: ClickObservation) => React.ReactNode;
|
|
9
10
|
/** Panel position relative to the chart. Default: "right" */
|
|
10
11
|
position?: "right" | "bottom" | "overlay";
|
|
11
12
|
/** Panel width (for "right" position) or height (for "bottom"). Default: 300 */
|
|
@@ -31,7 +32,7 @@ export interface DetailsPanelProps {
|
|
|
31
32
|
/** Inline style overrides */
|
|
32
33
|
style?: React.CSSProperties;
|
|
33
34
|
}
|
|
34
|
-
export declare function DetailsPanel({ children, position, size, trigger, chartId, observation: directObservation, dismissOnEmpty, showClose, onToggle, className, style, }: DetailsPanelProps):
|
|
35
|
+
export declare function DetailsPanel({ children, position, size, trigger, chartId, observation: directObservation, dismissOnEmpty, showClose, onToggle, className, style, }: DetailsPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
35
36
|
export declare namespace DetailsPanel {
|
|
36
37
|
var displayName: string;
|
|
37
38
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { LegendProps, GradientLegendConfig } from "./types/legendTypes";
|
|
3
2
|
/** Gradient legend for continuous/sequential color scales */
|
|
4
3
|
export declare function GradientLegend({ config, orientation, width, }: {
|
|
5
4
|
config: GradientLegendConfig;
|
|
6
5
|
orientation?: "vertical" | "horizontal";
|
|
7
6
|
width?: number;
|
|
8
|
-
}):
|
|
9
|
-
export default function Legend(props: LegendProps):
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default function Legend(props: LegendProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -82,4 +82,4 @@ export declare function estimateLegendRowCount(labels: string[], width: number):
|
|
|
82
82
|
* </LinkedCharts>
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
85
|
-
export declare function LinkedCharts({ children, selections, showLegend, legendPosition, legendInteraction, legendSelectionName, legendField, }: LinkedChartsProps):
|
|
85
|
+
export declare function LinkedCharts({ children, selections, showLegend, legendPosition, legendInteraction, legendSelectionName, legendField, }: LinkedChartsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ interface ThemeProviderProps {
|
|
|
7
7
|
theme?: ThemePresetName | Partial<SemioticTheme>;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
declare function ThemeProviderWrapper({ theme, children }: ThemeProviderProps):
|
|
10
|
+
declare function ThemeProviderWrapper({ theme, children }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function useTheme(): SemioticTheme;
|
|
12
12
|
export { ThemeProviderWrapper as ThemeProvider, useTheme };
|
|
13
13
|
export { LIGHT_THEME, DARK_THEME, HIGH_CONTRAST_THEME };
|
|
@@ -30,5 +30,5 @@ interface FlippingTooltipProps {
|
|
|
30
30
|
* After measuring the actual tooltip size via ref, repositions precisely to
|
|
31
31
|
* prevent clipping against container edges.
|
|
32
32
|
*/
|
|
33
|
-
export declare function FlippingTooltip({ x, y, containerWidth, containerHeight, margin, children, className, zIndex }: FlippingTooltipProps):
|
|
33
|
+
export declare function FlippingTooltip({ x, y, containerWidth, containerHeight, margin, children, className, zIndex }: FlippingTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Accessor } from "../charts/shared/types";
|
|
3
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
3
4
|
/**
|
|
4
5
|
* Configuration for a single tooltip field
|
|
5
6
|
*/
|
|
@@ -87,7 +88,7 @@ export declare const defaultTooltipStyle: React.CSSProperties;
|
|
|
87
88
|
* />
|
|
88
89
|
* ```
|
|
89
90
|
*/
|
|
90
|
-
export declare function Tooltip(config?: TooltipConfig): (data: Record<string, unknown>) =>
|
|
91
|
+
export declare function Tooltip(config?: TooltipConfig): (data: Record<string, unknown>) => import("react/jsx-runtime").JSX.Element | null;
|
|
91
92
|
/**
|
|
92
93
|
* Create a multi-line tooltip that displays multiple fields
|
|
93
94
|
*
|
|
@@ -130,7 +131,7 @@ export declare function Tooltip(config?: TooltipConfig): (data: Record<string, u
|
|
|
130
131
|
* />
|
|
131
132
|
* ```
|
|
132
133
|
*/
|
|
133
|
-
export declare function MultiLineTooltip(config?: MultiLineTooltipConfig): (data: Record<string, unknown>) =>
|
|
134
|
+
export declare function MultiLineTooltip(config?: MultiLineTooltipConfig): (data: Record<string, unknown>) => import("react/jsx-runtime").JSX.Element | null;
|
|
134
135
|
/**
|
|
135
136
|
* Type for tooltip prop that chart components accept
|
|
136
137
|
*/
|
|
@@ -139,7 +140,7 @@ export type TooltipProp = boolean | "multi" | ((data: Record<string, unknown>) =
|
|
|
139
140
|
* The function signature that Stream Frames expect for tooltipContent.
|
|
140
141
|
* Compatible with HoverData and any Record-based hover object.
|
|
141
142
|
*/
|
|
142
|
-
export type TooltipContentFn = (d:
|
|
143
|
+
export type TooltipContentFn = (d: Datum) => React.ReactNode;
|
|
143
144
|
/**
|
|
144
145
|
* Multi-point tooltip: shows all series values at the hovered X position
|
|
145
146
|
* with color swatches (legend-style). Used when tooltipMode="multi".
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
2
|
import type { StreamGeoFrameProps, ProjectionProp } from "../../stream/geoTypes";
|
|
3
3
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
4
4
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
5
5
|
import type { LegendInteractionMode } from "../shared/hooks";
|
|
6
6
|
import { type AreasProp } from "../../geo/useReferenceAreas";
|
|
7
|
-
export interface ChoroplethMapProps<TDatum extends
|
|
7
|
+
export interface ChoroplethMapProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
8
|
/** GeoJSON features or a reference string ("world-110m", "world-50m", "land-110m", "land-50m") */
|
|
9
9
|
areas: AreasProp;
|
|
10
10
|
/** Accessor for the numeric value to encode as color */
|
|
@@ -43,11 +43,11 @@ export interface ChoroplethMapProps<TDatum extends Record<string, any> = Record<
|
|
|
43
43
|
/** Fill opacity for area polygons. Useful for layering over tile basemaps. @default 1 */
|
|
44
44
|
areaOpacity?: number;
|
|
45
45
|
/** Annotations */
|
|
46
|
-
annotations?:
|
|
46
|
+
annotations?: Datum[];
|
|
47
47
|
/** Passthrough to StreamGeoFrame */
|
|
48
48
|
frameProps?: Partial<Omit<StreamGeoFrameProps, "areas" | "projection">>;
|
|
49
49
|
}
|
|
50
|
-
export declare function ChoroplethMap<TDatum extends
|
|
50
|
+
export declare function ChoroplethMap<TDatum extends Datum = Datum>(props: ChoroplethMapProps<TDatum>): import("react/jsx-runtime").JSX.Element;
|
|
51
51
|
export declare namespace ChoroplethMap {
|
|
52
52
|
var displayName: string;
|
|
53
53
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamGeoFrameProps, ProjectionProp } from "../../stream/geoTypes";
|
|
3
4
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
4
5
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
5
6
|
import type { LegendPosition } from "../shared/hooks";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface DistanceCartogramProps<TDatum extends
|
|
8
|
+
export interface DistanceCartogramProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
/** Point data with geographic coordinates */
|
|
9
10
|
points?: TDatum[];
|
|
10
11
|
/** Route/edge data with source/target fields */
|
|
@@ -23,7 +24,7 @@ export interface DistanceCartogramProps<TDatum extends Record<string, any> = Rec
|
|
|
23
24
|
/** ID of the center point */
|
|
24
25
|
center: string;
|
|
25
26
|
/** Cost/distance accessor — numeric field or function */
|
|
26
|
-
costAccessor: string | ((d:
|
|
27
|
+
costAccessor: string | ((d: Datum) => number);
|
|
27
28
|
/** Interpolation between geographic (0) and cartogram (1) @default 1 */
|
|
28
29
|
strength?: number;
|
|
29
30
|
/** Line rendering mode @default "straight" */
|
|
@@ -80,11 +81,11 @@ export interface DistanceCartogramProps<TDatum extends Record<string, any> = Rec
|
|
|
80
81
|
/** Label for cost units shown on rings (e.g. "hrs", "km") */
|
|
81
82
|
costLabel?: string;
|
|
82
83
|
/** Annotations */
|
|
83
|
-
annotations?:
|
|
84
|
+
annotations?: Datum[];
|
|
84
85
|
/** Passthrough */
|
|
85
86
|
frameProps?: Partial<Omit<StreamGeoFrameProps, "projection">>;
|
|
86
87
|
}
|
|
87
88
|
export declare const DistanceCartogram: {
|
|
88
|
-
<TDatum extends
|
|
89
|
+
<TDatum extends Datum = Datum>(props: DistanceCartogramProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
89
90
|
displayName?: string;
|
|
90
91
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
2
|
import type { StreamGeoFrameProps, ProjectionProp } from "../../stream/geoTypes";
|
|
3
3
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
4
4
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
5
5
|
import type { Style } from "../../stream/types";
|
|
6
6
|
import type { GeoParticleStyle } from "../../stream/GeoParticlePool";
|
|
7
7
|
import { type AreasProp } from "../../geo/useReferenceAreas";
|
|
8
|
-
export interface FlowMapProps<TDatum extends
|
|
8
|
+
export interface FlowMapProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
9
9
|
/** Flow edges with source/target/value */
|
|
10
10
|
flows?: {
|
|
11
11
|
source: string;
|
|
@@ -73,11 +73,11 @@ export interface FlowMapProps<TDatum extends Record<string, any> = Record<string
|
|
|
73
73
|
/** Max cached tiles @default 256 */
|
|
74
74
|
tileCacheSize?: number;
|
|
75
75
|
/** Annotations */
|
|
76
|
-
annotations?:
|
|
76
|
+
annotations?: Datum[];
|
|
77
77
|
/** Passthrough */
|
|
78
78
|
frameProps?: Partial<Omit<StreamGeoFrameProps, "projection">>;
|
|
79
79
|
}
|
|
80
|
-
export declare function FlowMap<TDatum extends
|
|
80
|
+
export declare function FlowMap<TDatum extends Datum = Datum>(props: FlowMapProps<TDatum>): import("react/jsx-runtime").JSX.Element;
|
|
81
81
|
export declare namespace FlowMap {
|
|
82
82
|
var displayName: string;
|
|
83
83
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamGeoFrameProps, ProjectionProp } from "../../stream/geoTypes";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -6,7 +7,7 @@ import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
|
6
7
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
7
8
|
import type { Style } from "../../stream/types";
|
|
8
9
|
import { type AreasProp } from "../../geo/useReferenceAreas";
|
|
9
|
-
export interface ProportionalSymbolMapProps<TDatum extends
|
|
10
|
+
export interface ProportionalSymbolMapProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
10
11
|
/** Point data with geographic coordinates */
|
|
11
12
|
points?: TDatum[];
|
|
12
13
|
/** Longitude accessor @default "lon" */
|
|
@@ -57,11 +58,11 @@ export interface ProportionalSymbolMapProps<TDatum extends Record<string, any> =
|
|
|
57
58
|
/** Max cached tiles @default 256 */
|
|
58
59
|
tileCacheSize?: number;
|
|
59
60
|
/** Annotations */
|
|
60
|
-
annotations?:
|
|
61
|
+
annotations?: Datum[];
|
|
61
62
|
/** Passthrough */
|
|
62
63
|
frameProps?: Partial<Omit<StreamGeoFrameProps, "points" | "projection">>;
|
|
63
64
|
}
|
|
64
65
|
export declare const ProportionalSymbolMap: {
|
|
65
|
-
<TDatum extends
|
|
66
|
+
<TDatum extends Datum = Datum>(props: ProportionalSymbolMapProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
66
67
|
displayName?: string;
|
|
67
68
|
};
|
|
@@ -28,6 +28,8 @@ export { QuadrantChart } from "./xy/QuadrantChart";
|
|
|
28
28
|
export type { QuadrantChartProps, QuadrantsConfig, QuadrantConfig, CenterlineStyle } from "./xy/QuadrantChart";
|
|
29
29
|
export { MultiAxisLineChart } from "./xy/MultiAxisLineChart";
|
|
30
30
|
export type { MultiAxisLineChartProps, MultiAxisSeriesConfig } from "./xy/MultiAxisLineChart";
|
|
31
|
+
export { CandlestickChart } from "./xy/CandlestickChart";
|
|
32
|
+
export type { CandlestickChartProps } from "./xy/CandlestickChart";
|
|
31
33
|
export { BarChart } from "./ordinal/BarChart";
|
|
32
34
|
export type { BarChartProps } from "./ordinal/BarChart";
|
|
33
35
|
export { StackedBarChart } from "./ordinal/StackedBarChart";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamNetworkFrameProps } from "../../stream/networkTypes";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -7,7 +8,7 @@ import type { LegendInteractionMode } from "../shared/hooks";
|
|
|
7
8
|
/**
|
|
8
9
|
* ChordDiagram component props
|
|
9
10
|
*/
|
|
10
|
-
export interface ChordDiagramProps<TNode extends
|
|
11
|
+
export interface ChordDiagramProps<TNode extends Datum = Datum, TEdge extends Datum = Datum> extends BaseChartProps {
|
|
11
12
|
nodes?: TNode[];
|
|
12
13
|
edges?: TEdge[];
|
|
13
14
|
sourceAccessor?: ChartAccessor<TEdge, string>;
|
|
@@ -16,7 +17,7 @@ export interface ChordDiagramProps<TNode extends Record<string, any> = Record<st
|
|
|
16
17
|
nodeIdAccessor?: ChartAccessor<TNode, string>;
|
|
17
18
|
colorBy?: ChartAccessor<TNode, string>;
|
|
18
19
|
colorScheme?: string | string[];
|
|
19
|
-
edgeColorBy?: "source" | "target" | ((d:
|
|
20
|
+
edgeColorBy?: "source" | "target" | ((d: Datum) => string);
|
|
20
21
|
padAngle?: number;
|
|
21
22
|
groupWidth?: number;
|
|
22
23
|
sortGroups?: (a: any, b: any) => number;
|
|
@@ -34,6 +35,6 @@ export interface ChordDiagramProps<TNode extends Record<string, any> = Record<st
|
|
|
34
35
|
* Wraps StreamNetworkFrame (canvas-first) for chord relationship visualization.
|
|
35
36
|
*/
|
|
36
37
|
export declare const ChordDiagram: {
|
|
37
|
-
<TNode extends
|
|
38
|
+
<TNode extends Datum = Datum, TEdge extends Datum = Datum>(props: ChordDiagramProps<TNode, TEdge> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
38
39
|
displayName?: string;
|
|
39
40
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
2
|
import type { StreamNetworkFrameProps } from "../../stream/networkTypes";
|
|
3
3
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
4
4
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
@@ -6,7 +6,7 @@ import type { LegendInteractionMode } from "../shared/hooks";
|
|
|
6
6
|
/**
|
|
7
7
|
* CirclePack component props
|
|
8
8
|
*/
|
|
9
|
-
export interface CirclePackProps<TNode extends
|
|
9
|
+
export interface CirclePackProps<TNode extends Datum = Datum> extends BaseChartProps {
|
|
10
10
|
data: TNode;
|
|
11
11
|
childrenAccessor?: ChartAccessor<TNode, TNode[]>;
|
|
12
12
|
valueAccessor?: ChartAccessor<TNode, number>;
|
|
@@ -28,7 +28,7 @@ export interface CirclePackProps<TNode extends Record<string, any> = Record<stri
|
|
|
28
28
|
*
|
|
29
29
|
* Wraps StreamNetworkFrame (canvas-first) for circle-pack visualization.
|
|
30
30
|
*/
|
|
31
|
-
export declare function CirclePack<TNode extends
|
|
31
|
+
export declare function CirclePack<TNode extends Datum = Datum>(props: CirclePackProps<TNode>): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export declare namespace CirclePack {
|
|
33
33
|
var displayName: string;
|
|
34
34
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamNetworkFrameProps } from "../../stream/networkTypes";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -7,7 +8,7 @@ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
|
7
8
|
/**
|
|
8
9
|
* ForceDirectedGraph component props
|
|
9
10
|
*/
|
|
10
|
-
export interface ForceDirectedGraphProps<TNode extends
|
|
11
|
+
export interface ForceDirectedGraphProps<TNode extends Datum = Datum, TEdge extends Datum = Datum> extends BaseChartProps {
|
|
11
12
|
nodes?: TNode[];
|
|
12
13
|
edges?: TEdge[];
|
|
13
14
|
nodeIDAccessor?: ChartAccessor<TNode, string>;
|
|
@@ -37,6 +38,6 @@ export interface ForceDirectedGraphProps<TNode extends Record<string, any> = Rec
|
|
|
37
38
|
* Wraps StreamNetworkFrame (canvas-first) for force-directed network visualization.
|
|
38
39
|
*/
|
|
39
40
|
export declare const ForceDirectedGraph: {
|
|
40
|
-
<TNode extends
|
|
41
|
+
<TNode extends Datum = Datum, TEdge extends Datum = Datum>(props: ForceDirectedGraphProps<TNode, TEdge> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
41
42
|
displayName?: string;
|
|
42
43
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamNetworkFrameProps } from "../../stream/networkTypes";
|
|
3
4
|
import type { BaseChartProps } from "../shared/types";
|
|
@@ -14,15 +15,15 @@ export interface OrbitNode {
|
|
|
14
15
|
id?: string;
|
|
15
16
|
}
|
|
16
17
|
type OrbitMode = "flat" | "solar" | "atomic" | number[];
|
|
17
|
-
export interface OrbitDiagramProps<TDatum extends
|
|
18
|
+
export interface OrbitDiagramProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
18
19
|
/** Hierarchical data — single root object with children */
|
|
19
20
|
data: TDatum;
|
|
20
21
|
/** How to access children from each datum @default "children" */
|
|
21
22
|
childrenAccessor?: string | ((d: TDatum) => TDatum[] | null | undefined);
|
|
22
23
|
/** How to identify each node @default "name" */
|
|
23
|
-
nodeIdAccessor?: string | ((d:
|
|
24
|
+
nodeIdAccessor?: string | ((d: Datum) => string);
|
|
24
25
|
/** Field or function for node color */
|
|
25
|
-
colorBy?: string | ((d:
|
|
26
|
+
colorBy?: string | ((d: Datum) => string);
|
|
26
27
|
/** Color scheme @default "category10" */
|
|
27
28
|
colorScheme?: string | string[];
|
|
28
29
|
/** Color by hierarchy depth instead of field @default false */
|
|
@@ -66,13 +67,13 @@ export interface OrbitDiagramProps<TDatum extends Record<string, any> = Record<s
|
|
|
66
67
|
/** Enable hover @default true */
|
|
67
68
|
enableHover?: boolean;
|
|
68
69
|
/** Annotation objects */
|
|
69
|
-
annotations?: Array<
|
|
70
|
+
annotations?: Array<Datum>;
|
|
70
71
|
/** Additional SVG content */
|
|
71
72
|
foregroundGraphics?: React.ReactNode;
|
|
72
73
|
/** Frame props passthrough */
|
|
73
74
|
frameProps?: Partial<Omit<StreamNetworkFrameProps, "data" | "size">>;
|
|
74
75
|
}
|
|
75
|
-
export declare function OrbitDiagram<TDatum extends
|
|
76
|
+
export declare function OrbitDiagram<TDatum extends Datum = Datum>(props: OrbitDiagramProps<TDatum>): import("react/jsx-runtime").JSX.Element;
|
|
76
77
|
export declare namespace OrbitDiagram {
|
|
77
78
|
var displayName: string;
|
|
78
79
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamNetworkFrameProps } from "../../stream/networkTypes";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -7,7 +8,7 @@ import type { LegendInteractionMode } from "../shared/hooks";
|
|
|
7
8
|
/**
|
|
8
9
|
* SankeyDiagram component props
|
|
9
10
|
*/
|
|
10
|
-
export interface SankeyDiagramProps<TNode extends
|
|
11
|
+
export interface SankeyDiagramProps<TNode extends Datum = Datum, TEdge extends Datum = Datum> extends BaseChartProps {
|
|
11
12
|
nodes?: TNode[];
|
|
12
13
|
edges?: TEdge[];
|
|
13
14
|
sourceAccessor?: ChartAccessor<TEdge, string>;
|
|
@@ -16,7 +17,7 @@ export interface SankeyDiagramProps<TNode extends Record<string, any> = Record<s
|
|
|
16
17
|
nodeIdAccessor?: ChartAccessor<TNode, string>;
|
|
17
18
|
colorBy?: ChartAccessor<TNode, string>;
|
|
18
19
|
colorScheme?: string | string[];
|
|
19
|
-
edgeColorBy?: "source" | "target" | "gradient" | ((d:
|
|
20
|
+
edgeColorBy?: "source" | "target" | "gradient" | ((d: Datum) => string);
|
|
20
21
|
orientation?: "horizontal" | "vertical";
|
|
21
22
|
nodeAlign?: "justify" | "left" | "right" | "center";
|
|
22
23
|
nodePaddingRatio?: number;
|
|
@@ -36,6 +37,6 @@ export interface SankeyDiagramProps<TNode extends Record<string, any> = Record<s
|
|
|
36
37
|
* Wraps StreamNetworkFrame (canvas-first) for Sankey flow visualization.
|
|
37
38
|
*/
|
|
38
39
|
export declare const SankeyDiagram: {
|
|
39
|
-
<TNode extends
|
|
40
|
+
<TNode extends Datum = Datum, TEdge extends Datum = Datum>(props: SankeyDiagramProps<TNode, TEdge> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
40
41
|
displayName?: string;
|
|
41
42
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
2
|
import type { StreamNetworkFrameProps } from "../../stream/networkTypes";
|
|
3
3
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
4
4
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
@@ -6,7 +6,7 @@ import type { LegendInteractionMode } from "../shared/hooks";
|
|
|
6
6
|
/**
|
|
7
7
|
* TreeDiagram component props
|
|
8
8
|
*/
|
|
9
|
-
export interface TreeDiagramProps<TNode extends
|
|
9
|
+
export interface TreeDiagramProps<TNode extends Datum = Datum> extends BaseChartProps {
|
|
10
10
|
data: TNode;
|
|
11
11
|
layout?: "tree" | "cluster" | "partition" | "treemap" | "circlepack";
|
|
12
12
|
orientation?: "vertical" | "horizontal" | "radial";
|
|
@@ -30,7 +30,7 @@ export interface TreeDiagramProps<TNode extends Record<string, any> = Record<str
|
|
|
30
30
|
*
|
|
31
31
|
* Wraps StreamNetworkFrame (canvas-first) for hierarchical tree visualization.
|
|
32
32
|
*/
|
|
33
|
-
export declare function TreeDiagram<TNode extends
|
|
33
|
+
export declare function TreeDiagram<TNode extends Datum = Datum>(props: TreeDiagramProps<TNode>): import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export declare namespace TreeDiagram {
|
|
35
35
|
var displayName: string;
|
|
36
36
|
}
|