Skip to content

Commit 426f3e9

Browse files
authored
Merge pull request #961 from nteract/iris-feedback-fixes
Add semanticGradient, downward hist, nodeStyle
2 parents 49e0b3b + 362738a commit 426f3e9

52 files changed

Lines changed: 998 additions & 125 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clinerules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Helpers: `resolveReferenceGeography("world-110m"|"world-50m")`, `mergeData(featu
8484

8585
Push API: `ref.current.push({ time, value })`. All pushed data **must** include a time field.
8686

87-
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
87+
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`, `direction`), **TemporalHistogram** (static-data sibling of RealtimeHistogram — same props minus `windowSize`/`windowMode`; takes a bounded `data` array), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
8888

8989
Encoding: `decay`, `pulse`, `transition`, `staleness` — compose freely.
9090

.cursorrules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Helpers: `resolveReferenceGeography("world-110m"|"world-50m")`, `mergeData(featu
8484

8585
Push API: `ref.current.push({ time, value })`. All pushed data **must** include a time field.
8686

87-
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
87+
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`, `direction`), **TemporalHistogram** (static-data sibling of RealtimeHistogram — same props minus `windowSize`/`windowMode`; takes a bounded `data` array), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
8888

8989
Encoding: `decay`, `pulse`, `transition`, `staleness` — compose freely.
9090

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Helpers: `resolveReferenceGeography("world-110m"|"world-50m")`, `mergeData(featu
8484

8585
Push API: `ref.current.push({ time, value })`. All pushed data **must** include a time field.
8686

87-
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
87+
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`, `direction`), **TemporalHistogram** (static-data sibling of RealtimeHistogram — same props minus `windowSize`/`windowMode`; takes a bounded `data` array), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
8888

8989
Encoding: `decay`, `pulse`, `transition`, `staleness` — compose freely.
9090

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jobs:
200200
# first time and skipped on subsequent runs — which left
201201
# single-test misses (a flaky run, a renamed test) permanently
202202
# failing CI because no second bootstrap pass would fire.
203-
run: npx playwright test --update-snapshots=missing
203+
run: npx playwright test --update-snapshots=changed
204204

205205
- name: Upload snapshot baselines
206206
if: always()

.windsurfrules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Helpers: `resolveReferenceGeography("world-110m"|"world-50m")`, `mergeData(featu
8484

8585
Push API: `ref.current.push({ time, value })`. All pushed data **must** include a time field.
8686

87-
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
87+
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`, `direction`), **TemporalHistogram** (static-data sibling of RealtimeHistogram — same props minus `windowSize`/`windowMode`; takes a bounded `data` array), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
8888

8989
Encoding: `decay`, `pulse`, `transition`, `staleness` — compose freely.
9090

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Helpers: `resolveReferenceGeography("world-110m"|"world-50m")`, `mergeData(featu
8484

8585
Push API: `ref.current.push({ time, value })`. All pushed data **must** include a time field.
8686

87-
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
87+
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`, `direction`), **TemporalHistogram** (static-data sibling of RealtimeHistogram — same props minus `windowSize`/`windowMode`; takes a bounded `data` array), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
8888

8989
Encoding: `decay`, `pulse`, `transition`, `staleness` — compose freely.
9090

ai/capabilities.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,19 @@
595595
"specialFeatures": [
596596
"live-stream"
597597
]
598+
},
599+
"TemporalHistogram": {
600+
"category": "realtime",
601+
"supportsLegend": true,
602+
"supportsSelection": true,
603+
"supportsLinkedHover": true,
604+
"supportsPush": false,
605+
"supportsSSR": false,
606+
"colorModel": "categorical",
607+
"layoutMode": "plugin",
608+
"specialFeatures": [
609+
"brush"
610+
]
598611
}
599612
}
600613
}

ai/componentMetadata.cjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const COMPONENTS_BY_CATEGORY = {
2121
"ChoroplethMap", "ProportionalSymbolMap", "FlowMap", "DistanceCartogram",
2222
],
2323
realtime: [
24-
"RealtimeLineChart", "RealtimeHistogram", "RealtimeSwarmChart",
24+
"RealtimeLineChart", "RealtimeHistogram", "TemporalHistogram", "RealtimeSwarmChart",
2525
"RealtimeWaterfallChart", "RealtimeHeatmap",
2626
],
2727
}
@@ -52,11 +52,18 @@ function importPathForCategory(category) {
5252
function metadataForComponent(entryOrName) {
5353
const name = typeof entryOrName === "string" ? entryOrName : entryOrName.name
5454
const category = categoryForComponent(name)
55+
// Realtime push-streaming charts are browser-only by design.
56+
// TemporalHistogram is the static-data sibling living in the
57+
// "realtime" category for documentation grouping — it accepts a
58+
// bounded data array and is renderable through the SSR path like
59+
// any other static HOC. Matches the name-prefix exclusion the
60+
// check-surface-parity script applies.
61+
const isPushOnly = category === "realtime" && name.startsWith("Realtime")
5562
return {
5663
name,
5764
category,
5865
importPath: importPathForCategory(category),
59-
renderable: category !== "realtime",
66+
renderable: !isPushOnly,
6067
description: typeof entryOrName === "string" ? undefined : entryOrName.description,
6168
}
6269
}

ai/componentRegistry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
BarChart, StackedBarChart, GroupedBarChart, SwarmPlot, BoxPlot, DotPlot,
1111
Histogram, ViolinPlot, RidgelinePlot,
1212
PieChart, DonutChart, GaugeChart, FunnelChart, LikertChart, SwimlaneChart,
13-
ForceDirectedGraph, ChordDiagram, SankeyDiagram, ProcessSankey, TreeDiagram, Treemap, CirclePack, OrbitDiagram
13+
ForceDirectedGraph, ChordDiagram, SankeyDiagram, ProcessSankey, TreeDiagram, Treemap, CirclePack, OrbitDiagram,
14+
TemporalHistogram
1415
} from "semiotic/ai"
1516

1617
import {
@@ -36,6 +37,7 @@ export const COMPONENT_REGISTRY: Record<string, RegistryEntry> = {
3637
QuadrantChart: { component: QuadrantChart, category: "xy" },
3738
MultiAxisLineChart: { component: MultiAxisLineChart, category: "xy" },
3839
CandlestickChart: { component: CandlestickChart, category: "xy" },
40+
TemporalHistogram: { component: TemporalHistogram, category: "xy" },
3941

4042
BarChart: { component: BarChart, category: "ordinal" },
4143
StackedBarChart: { component: StackedBarChart, category: "ordinal" },

ai/examples.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,33 @@ const data = [
292292

293293
Key props: `orderAccessor` sequences points along the path, Viridis gradient from start→end
294294

295+
### TemporalHistogram
296+
297+
```jsx
298+
import { TemporalHistogram } from "semiotic/ai"
299+
300+
// One row per event; the chart bins events into `binSize` time buckets.
301+
const events = [
302+
{ time: 1700000000000, value: 1, category: "errors" },
303+
{ time: 1700000005000, value: 1, category: "warnings" },
304+
{ time: 1700000007000, value: 1, category: "errors" },
305+
{ time: 1700000020000, value: 1, category: "info" },
306+
{ time: 1700000022000, value: 1, category: "info" },
307+
{ time: 1700000040000, value: 1, category: "errors" },
308+
{ time: 1700000045000, value: 1, category: "warnings" }
309+
]
310+
311+
<TemporalHistogram
312+
data={events}
313+
binSize={15000}
314+
categoryAccessor="category"
315+
colors={{ errors: "#dc3545", warnings: "#fd7e14", info: "#007bff" }}
316+
enableHover
317+
/>
318+
```
319+
320+
Static-data sibling of `RealtimeHistogram` — accepts a bounded `data` array instead of a push-mode ref. Same props minus `windowSize` / `windowMode`. Use for backfilled or historical temporal histograms where the time range is fixed; reach for `RealtimeHistogram` when events arrive over time and you want a sliding window.
321+
295322
---
296323

297324
## Flat Array — Ordinal Charts

0 commit comments

Comments
 (0)