chartgpu 0.1.8 → 0.1.9

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 CHANGED
@@ -31,6 +31,7 @@ ChartGPU is a TypeScript charting library built on WebGPU for smooth, interactiv
31
31
  - 🚀 WebGPU-accelerated rendering for high FPS with large datasets
32
32
  - ⚡ Worker-based rendering with OffscreenCanvas (optional - for maximum performance)
33
33
  - 📈 Multiple series types: line, area, bar, scatter, pie, candlestick
34
+ - 🌡️ 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/)
34
35
  - 🧭 Built-in interaction: hover highlight, tooltip, crosshair
35
36
  - 🔁 Streaming updates via `appendData(...)` (cartesian series)
36
37
  - 🔍 X-axis zoom (inside gestures + optional slider UI)
@@ -81,7 +82,8 @@ flowchart TB
81
82
  Coordinator --> Layout["GridArea layout"]
82
83
  Coordinator --> Scales["xScale/yScale (clip space for render)"]
83
84
  Coordinator --> DataUpload["createDataStore(device) (GPU buffer upload/caching)"]
84
- Coordinator --> RenderPass["Encode + submit render pass"]
85
+ Coordinator --> DensityCompute["Encode + submit compute pass<br/>(scatter density mode)"]
86
+ DensityCompute --> RenderPass["Encode + submit render pass"]
85
87
 
86
88
  subgraph InternalOverlays["Internal interaction overlays (coordinator)"]
87
89
  Coordinator --> Events["createEventManager(canvas, gridArea)"]
@@ -175,6 +177,7 @@ flowchart TB
175
177
  RenderPass --> AreaR["Area"]
176
178
  RenderPass --> BarR["Bar"]
177
179
  RenderPass --> ScatterR["Scatter"]
180
+ RenderPass --> ScatterDensityR["Scatter density/heatmap"]
178
181
  RenderPass --> LineR["Line"]
179
182
  RenderPass --> PieR["Pie"]
180
183
  RenderPass --> CandlestickR["Candlestick"]
@@ -190,6 +193,8 @@ flowchart TB
190
193
  AreaR --> areaWGSL["area.wgsl"]
191
194
  BarR --> barWGSL["bar.wgsl"]
192
195
  ScatterR --> scatterWGSL["scatter.wgsl"]
196
+ ScatterDensityR --> scatterDensityBinningWGSL["scatterDensityBinning.wgsl"]
197
+ ScatterDensityR --> scatterDensityColormapWGSL["scatterDensityColormap.wgsl"]
193
198
  LineR --> lineWGSL["line.wgsl"]
194
199
  PieR --> pieWGSL["pie.wgsl"]
195
200
  CandlestickR --> candlestickWGSL["candlestick.wgsl"]
@@ -217,6 +222,12 @@ Financial OHLC (open-high-low-close) candlestick rendering with classic/hollow s
217
222
 
218
223
  ![Candlestick chart example](docs/assets/candle-stick-example.png)
219
224
 
225
+ ### Scatter Density (1M points)
226
+
227
+ GPU-binned density/heatmap mode for scatter plots (`mode: 'density'`) to reveal structure in overplotted point clouds. See [`docs/api/options.md#scatterseriesconfig`](docs/api/options.md#scatterseriesconfig) and the demo in [`examples/scatter-density-1m/`](examples/scatter-density-1m/).
228
+
229
+ ![Scatter density chart example (1M points)](docs/assets/scatter-plot-density-chart-1million-points-example.png)
230
+
220
231
  ## Quick start
221
232
 
222
233
  ```ts