chartgpu 0.2.4 → 0.2.5
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 +103 -182
- package/dist/core/createRenderCoordinator.d.ts.map +1 -1
- package/dist/data/cartesianData.d.ts +5 -0
- package/dist/data/cartesianData.d.ts.map +1 -1
- package/dist/index.js +2726 -2746
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,34 +1,85 @@
|
|
|
1
|
-
<p align="center">
|
|
1
|
+
<p align="center" style="margin-bottom:0; margin-top:20px;">
|
|
2
2
|
<img src="docs/assets/chartgpu.png" alt="ChartGPU" width="400">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<p align="center">
|
|
6
|
-
|
|
5
|
+
<p align="center" style="margin-top:-18px;">
|
|
6
|
+
The fastest open-source charting library — 50M points at 60 FPS, powered by WebGPU.
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
|
|
11
|
-
[](https://github.com/hunterg325/ChartGPU/tree/main/examples)
|
|
12
|
-
[](https://github.com/hunterg325/ChartGPU/blob/main/docs/GETTING_STARTED.md)
|
|
13
11
|
|
|
14
|
-
[
|
|
12
|
+
[<img src="docs/assets/powered-by-webgpu.svg" alt="Powered by WebGPU" height="28" />](https://forthebadge.com)
|
|
13
|
+
[](https://github.com/chartgpu/chartgpu)
|
|
14
|
+
[](https://github.com/chartgpu/chartgpu/actions/workflows/tests.yml)
|
|
15
|
+
[](https://www.npmjs.com/package/chartgpu)
|
|
16
|
+
[](https://www.npmjs.com/package/chartgpu)
|
|
17
|
+
[](https://github.com/chartgpu/chartgpu/blob/main/LICENSE)
|
|
18
|
+
[](https://chartgpu.github.io/chartgpu/)
|
|
19
|
+
[](https://github.com/chartgpu/chartgpu/tree/main/examples)
|
|
20
|
+
[](https://github.com/chartgpu/chartgpu/blob/main/docs/GETTING_STARTED.md)
|
|
15
21
|
|
|
22
|
+
[<img src="https://hackerbadge.now.sh/api?id=46706528" alt="Featured on Hacker News" height="30" />](https://news.ycombinator.com/item?id=46706528)
|
|
16
23
|
|
|
24
|
+
[<img src="https://awesome.re/mentioned-badge.svg" alt="Featured in Awesome WebGPU" style="height: 30px;" />](https://github.com/mikbry/awesome-webgpu)
|
|
17
25
|
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
[](https://github.com/hunterg325/ChartGPU/blob/main/LICENSE)
|
|
21
|
-
[](https://chartgpu.github.io/ChartGPU/)
|
|
27
|
+
</div>
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
ChartGPU is a TypeScript charting library built on WebGPU for smooth, interactive rendering—especially when you have lots of data.
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
## Demo
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
### 35M points (benchmark)
|
|
28
36
|
|
|
37
|
+
35,000,000 points rendered at ~72 FPS (benchmark mode).
|
|
29
38
|
|
|
39
|
+

|
|
30
40
|
|
|
31
|
-
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { ChartGPU } from 'chartgpu';
|
|
45
|
+
const container = document.getElementById('chart')!;
|
|
46
|
+
await ChartGPU.create(container, {
|
|
47
|
+
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Annotations
|
|
52
|
+
|
|
53
|
+
Add reference lines, point markers, and text overlays to highlight important data features:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
await ChartGPU.create(container, {
|
|
57
|
+
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
|
|
58
|
+
annotations: [
|
|
59
|
+
// Horizontal reference line
|
|
60
|
+
{
|
|
61
|
+
id: 'ref-y',
|
|
62
|
+
type: 'lineY',
|
|
63
|
+
y: 2.5,
|
|
64
|
+
layer: 'belowSeries',
|
|
65
|
+
style: { color: '#ffd166', lineWidth: 2, lineDash: [8, 6], opacity: 0.95 },
|
|
66
|
+
label: { text: 'threshold' },
|
|
67
|
+
},
|
|
68
|
+
// Point marker at peak
|
|
69
|
+
{
|
|
70
|
+
id: 'peak',
|
|
71
|
+
type: 'point',
|
|
72
|
+
x: 1,
|
|
73
|
+
y: 3,
|
|
74
|
+
layer: 'aboveSeries',
|
|
75
|
+
marker: { symbol: 'circle', size: 8, style: { color: '#ff4ab0' } },
|
|
76
|
+
label: { template: 'peak={y}', decimals: 2 },
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
See [Annotations Documentation](https://github.com/chartgpu/chartgpu/blob/main/docs/api/options.md#annotations) and the [annotations example](https://github.com/chartgpu/chartgpu/tree/main/examples/annotation-authoring).
|
|
32
83
|
|
|
33
84
|
## Highlights
|
|
34
85
|
|
|
@@ -37,136 +88,22 @@ ChartGPU is a TypeScript charting library built on WebGPU for smooth, interactiv
|
|
|
37
88
|
- 🌡️ Scatter density/heatmap mode (`mode: 'density'`) for large point clouds — see [`docs/api/options.md#scatterseriesconfig`](docs/api/options.md#scatterseriesconfig) and [`examples/scatter-density-1m/`](examples/scatter-density-1m/)
|
|
38
89
|
- 📍 Annotation overlays: reference lines (horizontal/vertical), point markers, and text labels — see [`docs/api/options.md#annotations`](docs/api/options.md#annotations) and [`examples/annotations/`](examples/annotations/)
|
|
39
90
|
- 🧭 Built-in interaction: hover highlight, tooltip, crosshair
|
|
40
|
-
- 🔁 Streaming updates via
|
|
91
|
+
- 🔁 Streaming updates via `appendData(...)` with typed-array support (`XYArraysData`, `InterleavedXYData`, `DataPoint[]`) — see [`examples/cartesian-data-formats/`](examples/cartesian-data-formats/)
|
|
41
92
|
- 🔍 X-axis zoom (inside gestures + optional slider UI)
|
|
42
93
|
- 🎛️ Theme presets (`'dark' | 'light'`) and custom theme support
|
|
43
94
|
|
|
95
|
+
## Performance
|
|
44
96
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
At a high level, `ChartGPU.create(...)` owns the canvas + WebGPU lifecycle, and delegates render orchestration (layout/scales/data upload/render passes + internal overlays) to the render coordinator. For deeper internal notes, see [`docs/api/INTERNALS.md`](https://github.com/hunterg325/ChartGPU/blob/main/docs/api/INTERNALS.md) (especially "Render coordinator").
|
|
48
|
-
|
|
49
|
-
```mermaid
|
|
50
|
-
flowchart TB
|
|
51
|
-
UserApp["Consumer app"] --> PublicAPI["src/index.ts (Public API exports)"]
|
|
52
|
-
|
|
53
|
-
PublicAPI --> ChartCreate["ChartGPU.create(container, options)"]
|
|
54
|
-
PublicAPI --> SyncAPI["connectCharts(charts)"]
|
|
55
|
-
|
|
56
|
-
subgraph MainThread["🔷 MAIN THREAD RENDERING (Default)"]
|
|
57
|
-
subgraph ChartInstance["Chart instance (src/ChartGPU.ts)"]
|
|
58
|
-
ChartCreate --> SupportCheck["checkWebGPUSupport()"]
|
|
59
|
-
ChartCreate --> Canvas["Create canvas + mount into container"]
|
|
60
|
-
ChartCreate --> Options["resolveOptionsForChart(options)<br/>(adds bottom reserve when slider present)"]
|
|
61
|
-
ChartCreate --> GPUInit["GPUContext.create(canvas)"]
|
|
62
|
-
ChartCreate --> Coordinator["createRenderCoordinator(gpuContext, resolvedOptions)"]
|
|
63
|
-
|
|
64
|
-
ChartCreate --> InstanceAPI["ChartGPUInstance APIs"]
|
|
65
|
-
InstanceAPI --> RequestRender["requestAnimationFrame (coalesced)"]
|
|
66
|
-
RequestRender --> Coordinator
|
|
67
|
-
|
|
68
|
-
InstanceAPI --> SetOption["setOption(...)"]
|
|
69
|
-
InstanceAPI --> AppendData["appendData(...)<br/>(XYArraysData | InterleavedXYData | DataPoint[])"]
|
|
70
|
-
InstanceAPI --> Resize["resize()"]
|
|
71
|
-
|
|
72
|
-
subgraph PublicEvents["Public events + hit-testing (ChartGPU.ts)"]
|
|
73
|
-
Canvas --> PointerHandlers["Pointer listeners"]
|
|
74
|
-
PointerHandlers --> PublicHitTest["findNearestPoint() / findPieSlice()<br/>(with internal visibility filtering)"]
|
|
75
|
-
PointerHandlers --> EmitEvents["emit('click'/'mouseover'/'mouseout')"]
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
DataZoomSlider["dataZoom slider (absolute-positioned DOM overlay)<br/>chart reserves bottom space for x-axis"] --> Coordinator
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
subgraph WebGPUCore["WebGPU core (src/core/GPUContext.ts)"]
|
|
82
|
-
GPUInit --> AdapterDevice["navigator.gpu.requestAdapter/device"]
|
|
83
|
-
GPUInit --> CanvasConfig["canvasContext.configure(format)"]
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
subgraph RenderCoordinatorLayer["Render coordinator (src/core/createRenderCoordinator.ts)<br/>Modular architecture with specialized modules"]
|
|
87
|
-
subgraph CoordModules["Coordinator modules (src/core/renderCoordinator/*)"]
|
|
88
|
-
Utils["utils/ - Canvas, bounds, axes, time formatting"]
|
|
89
|
-
GPU["gpu/ - Texture management, MSAA"]
|
|
90
|
-
Renderers["renderers/ - Renderer pool management"]
|
|
91
|
-
DataMods["data/ - Visible slice computation"]
|
|
92
|
-
Zoom["zoom/ - Zoom state utilities"]
|
|
93
|
-
Anim["animation/ - Animation helpers"]
|
|
94
|
-
Interact["interaction/ - Pointer & hit-testing"]
|
|
95
|
-
UI["ui/ - Tooltip & legend helpers"]
|
|
96
|
-
AxisMods["axis/ - Tick computation & labels"]
|
|
97
|
-
Annot["annotations/ - Annotation processing"]
|
|
98
|
-
Render["render/ - Series, overlays, labels"]
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
Coordinator --> CoordModules
|
|
102
|
-
|
|
103
|
-
Coordinator --> Layout["GridArea layout"]
|
|
104
|
-
Coordinator --> Scales["xScale/yScale (clip space for render)"]
|
|
105
|
-
Coordinator --> DataUpload["createDataStore(device) (GPU buffer upload/caching)"]
|
|
106
|
-
Coordinator --> DensityCompute["Encode + submit compute pass<br/>(scatter density mode)"]
|
|
107
|
-
DensityCompute --> RenderPass["Encode + submit render pass"]
|
|
108
|
-
|
|
109
|
-
subgraph InternalOverlays["Internal interaction overlays (coordinator)"]
|
|
110
|
-
Coordinator --> Events["createEventManager(canvas, gridArea)"]
|
|
111
|
-
Events --> OverlayHitTest["hover/tooltip hit-testing<br/>(hit-testing functions filter<br/>for visible series internally)"]
|
|
112
|
-
Events --> InteractionX["interaction-x state (crosshair)"]
|
|
113
|
-
Coordinator --> OverlaysDOM["DOM overlays: legend / tooltip / text labels / annotation labels"]
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
subgraph Renderers["GPU renderers (src/renderers/*)"]
|
|
119
|
-
RenderPass --> GridR["Grid"]
|
|
120
|
-
RenderPass --> AreaR["Area"]
|
|
121
|
-
RenderPass --> BarR["Bar"]
|
|
122
|
-
RenderPass --> ScatterR["Scatter"]
|
|
123
|
-
RenderPass --> ScatterDensityR["Scatter density/heatmap"]
|
|
124
|
-
RenderPass --> LineR["Line"]
|
|
125
|
-
RenderPass --> PieR["Pie"]
|
|
126
|
-
RenderPass --> CandlestickR["Candlestick"]
|
|
127
|
-
RenderPass --> ReferenceLineR["Reference lines"]
|
|
128
|
-
RenderPass --> AnnotationMarkerR["Annotation markers"]
|
|
129
|
-
RenderPass --> CrosshairR["Crosshair overlay"]
|
|
130
|
-
RenderPass --> HighlightR["Hover highlight overlay"]
|
|
131
|
-
RenderPass --> AxisR["Axes/ticks"]
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
subgraph Shaders["WGSL shaders (src/shaders/*)"]
|
|
135
|
-
GridR --> gridWGSL["grid.wgsl"]
|
|
136
|
-
AreaR --> areaWGSL["area.wgsl"]
|
|
137
|
-
BarR --> barWGSL["bar.wgsl"]
|
|
138
|
-
ScatterR --> scatterWGSL["scatter.wgsl"]
|
|
139
|
-
ScatterDensityR --> scatterDensityBinningWGSL["scatterDensityBinning.wgsl"]
|
|
140
|
-
ScatterDensityR --> scatterDensityColormapWGSL["scatterDensityColormap.wgsl"]
|
|
141
|
-
LineR --> lineWGSL["line.wgsl"]
|
|
142
|
-
PieR --> pieWGSL["pie.wgsl"]
|
|
143
|
-
CandlestickR --> candlestickWGSL["candlestick.wgsl"]
|
|
144
|
-
ReferenceLineR --> referenceLineWGSL["referenceLine.wgsl"]
|
|
145
|
-
AnnotationMarkerR --> annotationMarkerWGSL["annotationMarker.wgsl"]
|
|
146
|
-
CrosshairR --> crosshairWGSL["crosshair.wgsl"]
|
|
147
|
-
HighlightR --> highlightWGSL["highlight.wgsl"]
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
subgraph ChartSync["Chart sync (src/interaction/createChartSync.ts)"]
|
|
151
|
-
SyncAPI --> ListenX["listen: 'crosshairMove'"]
|
|
152
|
-
SyncAPI --> DriveX["setCrosshairX(...) on peers"]
|
|
153
|
-
SyncAPI -. "optional" .-> ListenZoom["listen: 'zoomRangeChange'"]
|
|
154
|
-
SyncAPI -. "optional" .-> DriveZoom["setZoomRange(...) on peers"]
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
InteractionX --> ListenX
|
|
158
|
-
DriveX --> InstanceAPI
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### 35M points (benchmark)
|
|
162
|
-
|
|
163
|
-
35,000,000 points rendered at ~72 FPS (benchmark mode).
|
|
97
|
+
ChartGPU leverages WebGPU to render datasets orders of magnitude larger than traditional Canvas2D or SVG-based charting libraries. The table below shows ChartGPU line-chart FPS at various dataset sizes, measured with the [benchmark harness](examples/benchmark-comparison/) on an Apple M3 Pro / Chrome 131 / 2x DPR at 800x500 canvas.
|
|
164
98
|
|
|
165
|
-
|
|
99
|
+
| Data Points | ChartGPU (WebGPU) | Canvas2D Libraries | SVG Libraries |
|
|
100
|
+
|:-----------:|:------------------:|:------------------:|:-------------:|
|
|
101
|
+
| **100K** | ~60 FPS | ~30-60 FPS | ~5-15 FPS |
|
|
102
|
+
| **1M** | ~60 FPS | ~1-5 FPS | N/A |
|
|
103
|
+
| **10M** | ~60 FPS | N/A | N/A |
|
|
104
|
+
| **35M** | ~72 FPS | N/A | N/A |
|
|
166
105
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-

|
|
106
|
+
> **Note**: Canvas2D and SVG columns show typical ranges for popular libraries (Chart.js, ECharts, D3) based on publicly available benchmarks. "N/A" means the library cannot render that dataset size interactively. Actual results vary by hardware, browser, and library version. Run the [benchmark harness](examples/benchmark-comparison/) to produce numbers for your own environment. See [`docs/benchmarks/comparison.md`](docs/benchmarks/comparison.md) for full methodology.
|
|
170
107
|
|
|
171
108
|
### Candlestick Charts
|
|
172
109
|
|
|
@@ -180,7 +117,6 @@ GPU-binned density/heatmap mode for scatter plots (`mode: 'density'`) to reveal
|
|
|
180
117
|
|
|
181
118
|

|
|
182
119
|
|
|
183
|
-
|
|
184
120
|
### Interactive Annotation Authoring
|
|
185
121
|
|
|
186
122
|
Full-featured annotation authoring system with interactive editing capabilities. Create, edit, drag, and delete annotations with an intuitive UI. Supports all annotation types: reference lines (horizontal/vertical), point markers, text annotations (plot-space + data-space tracking), labels, and styling options.
|
|
@@ -199,52 +135,23 @@ Full-featured annotation authoring system with interactive editing capabilities.
|
|
|
199
135
|
|
|
200
136
|
The annotation authoring system is demonstrated in the [`examples/annotation-authoring/`](examples/annotation-authoring/) example.
|
|
201
137
|
|
|
202
|
-
##
|
|
138
|
+
## Installation
|
|
203
139
|
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
const container = document.getElementById('chart')!;
|
|
207
|
-
await ChartGPU.create(container, {
|
|
208
|
-
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
|
|
209
|
-
});
|
|
140
|
+
```bash
|
|
141
|
+
npm install chartgpu
|
|
210
142
|
```
|
|
211
143
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
Add reference lines, point markers, and text overlays to highlight important data features:
|
|
144
|
+
**GitHub Packages:**
|
|
215
145
|
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
|
|
219
|
-
annotations: [
|
|
220
|
-
// Horizontal reference line
|
|
221
|
-
{
|
|
222
|
-
id: 'ref-y',
|
|
223
|
-
type: 'lineY',
|
|
224
|
-
y: 2.5,
|
|
225
|
-
layer: 'belowSeries',
|
|
226
|
-
style: { color: '#ffd166', lineWidth: 2, lineDash: [8, 6], opacity: 0.95 },
|
|
227
|
-
label: { text: 'threshold' },
|
|
228
|
-
},
|
|
229
|
-
// Point marker at peak
|
|
230
|
-
{
|
|
231
|
-
id: 'peak',
|
|
232
|
-
type: 'point',
|
|
233
|
-
x: 1,
|
|
234
|
-
y: 3,
|
|
235
|
-
layer: 'aboveSeries',
|
|
236
|
-
marker: { symbol: 'circle', size: 8, style: { color: '#ff4ab0' } },
|
|
237
|
-
label: { template: 'peak={y}', decimals: 2 },
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
});
|
|
146
|
+
```bash
|
|
147
|
+
npm install @chartgpu/chartgpu
|
|
241
148
|
```
|
|
242
149
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
## Installation
|
|
150
|
+
For GitHub Packages, configure your `.npmrc`:
|
|
246
151
|
|
|
247
|
-
|
|
152
|
+
```
|
|
153
|
+
@chartgpu:registry=https://npm.pkg.github.com
|
|
154
|
+
```
|
|
248
155
|
|
|
249
156
|
## React Integration
|
|
250
157
|
|
|
@@ -278,22 +185,36 @@ See the [chartgpu-react repository](https://github.com/ChartGPU/chartgpu-react)
|
|
|
278
185
|
|
|
279
186
|
See the [gpuweb repository](https://github.com/gpuweb/gpuweb/wiki/Implementation-Status) for full Implementation Status
|
|
280
187
|
|
|
188
|
+
## Who's Using ChartGPU
|
|
189
|
+
|
|
190
|
+
ChartGPU is a young project and we'd love to hear how you're using it! If your team or project uses ChartGPU, [open a pull request](https://github.com/chartgpu/chartgpu/pulls) to add your name here.
|
|
191
|
+
|
|
192
|
+
<!-- Add your project/company below:
|
|
193
|
+
- [Your Project](https://link) — short description
|
|
194
|
+
-->
|
|
195
|
+
|
|
281
196
|
## Documentation
|
|
282
197
|
|
|
283
|
-
- Full documentation: [Getting Started](https://github.com/
|
|
284
|
-
- API reference: [`docs/api/README.md`](https://github.com/
|
|
198
|
+
- Full documentation: [Getting Started](https://github.com/chartgpu/chartgpu/blob/main/docs/GETTING_STARTED.md)
|
|
199
|
+
- API reference: [`docs/api/README.md`](https://github.com/chartgpu/chartgpu/blob/main/docs/api/README.md)
|
|
285
200
|
|
|
286
201
|
## Examples
|
|
287
202
|
|
|
288
|
-
- Browse examples: [`examples/`](https://github.com/
|
|
203
|
+
- Browse examples: [`examples/`](https://github.com/chartgpu/chartgpu/tree/main/examples)
|
|
289
204
|
- Run locally:
|
|
290
205
|
- `npm install`
|
|
291
206
|
- `npm run dev` (opens `http://localhost:5173/examples/`)
|
|
292
207
|
|
|
293
208
|
## Contributing
|
|
294
209
|
|
|
295
|
-
See [`CONTRIBUTING.md`](https://github.com/
|
|
210
|
+
See [`CONTRIBUTING.md`](https://github.com/chartgpu/chartgpu/blob/main/CONTRIBUTING.md).
|
|
296
211
|
|
|
297
212
|
## License
|
|
298
213
|
|
|
299
|
-
MIT — see [`LICENSE`](https://github.com/
|
|
214
|
+
MIT — see [`LICENSE`](https://github.com/chartgpu/chartgpu/blob/main/LICENSE).
|
|
215
|
+
|
|
216
|
+
## Architecture
|
|
217
|
+
|
|
218
|
+
ChartGPU follows a functional-first architecture. `ChartGPU.create(...)` owns the canvas and WebGPU lifecycle, delegating render orchestration to a modular render coordinator with 11 specialized modules.
|
|
219
|
+
|
|
220
|
+
For the full architecture diagram, see [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md). For deep internal notes, see [`docs/api/INTERNALS.md`](docs/api/INTERNALS.md).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRenderCoordinator.d.ts","sour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M,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD,CAAC,CAAC;AAq4BH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,uBAAuB,EAChC,SAAS,CAAC,EAAE,0BAA0B,GACrC,iBAAiB,CAkpFnB"}
|
|
@@ -27,14 +27,19 @@ export type Bounds = Readonly<{
|
|
|
27
27
|
export declare function getPointCount(data: CartesianSeriesData): number;
|
|
28
28
|
/**
|
|
29
29
|
* Returns the x-coordinate of the point at index i.
|
|
30
|
+
* Returns NaN if the point is undefined, null, or non-object (for DataPoint[] format).
|
|
31
|
+
* This allows callers using `Number.isFinite()` to naturally skip missing points.
|
|
30
32
|
*/
|
|
31
33
|
export declare function getX(data: CartesianSeriesData, i: number): number;
|
|
32
34
|
/**
|
|
33
35
|
* Returns the y-coordinate of the point at index i.
|
|
36
|
+
* Returns NaN if the point is undefined, null, or non-object (for DataPoint[] format).
|
|
37
|
+
* This allows callers using `Number.isFinite()` to naturally skip missing points.
|
|
34
38
|
*/
|
|
35
39
|
export declare function getY(data: CartesianSeriesData, i: number): number;
|
|
36
40
|
/**
|
|
37
41
|
* Returns the size value of the point at index i, or undefined if not available.
|
|
42
|
+
* Returns undefined if the point is undefined, null, or non-object (for DataPoint[] format).
|
|
38
43
|
* Note: InterleavedXYData does NOT support interleaved size (use XYArraysData.size if needed).
|
|
39
44
|
*/
|
|
40
45
|
export declare function getSize(data: CartesianSeriesData, i: number): number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianData.d.ts","sourceRoot":"","sources":["../../src/data/cartesianData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE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