View on GitHub
ChartGPU Examples
Hello World
Animated clear color cycling through the color spectrum - demonstrates continuous rendering
Basic Line
Sine wave line series (100 points) with grid + axes - demonstrates ChartGPU.create + setOption + resize
Data Update Animation
Updates data and animates (cartesian y + scale/domain, pie slice angles)
Scatter
Scatter plot with ~10k points - fixed symbolSize, per-point [x,y,size], and symbolSize function
Scatter Density (1M)
1M point scatter rendered as a density heatmap (GPU binning + colormap), with binSize/colormap/normalization controls
Zoom-aware Sampling
Zoom in for more detail, zoom out for performance (debounced re-sampling of visible range)
Million Point Benchmark
1M points benchmark with sampling toggle and FPS comparison (raw vs sampled)
Ultimate Benchmark
Hardcore benchmark UI with exact FPS + frame-time metrics, multi-series stress, and streaming append (main thread)
Live Streaming
Streaming appendData demo with autoScroll toggle + dataZoom slider
Grouped Bar
Clustered + stacked bars (stack + barWidth/barGap/barCategoryGap + negative values)
Candlestick
Financial OHLC chart with classic/hollow style toggle and customizable colors + border width
Candlestick Streaming
Professional crypto trading terminal with live tick simulation at 75/sec, real-time candle aggregation, and streaming updates
Pie / Donut
Two charts: a pie (inner radius 0) and a donut (inner radius > 0) with per-slice colors
Grid Renderer Test
Interactive grid renderer with configurable line counts - demonstrates grid rendering and clip-space coordinates
Chart Sync
Two charts with synced crosshair x-position and axis tooltip x-value (via connectCharts)
Interactive
Two stacked charts with synced crosshair and axis tooltip, plus click logging for interactions
Annotations
Comprehensive annotation demo with reference lines, point markers, text (plot-space + data-space), interactive authoring via right-click, undo/redo, and JSON export
Cartesian Data Formats
Demonstrates three CartesianSeriesData input formats: XYArraysData (Float64Array/Float32Array), InterleavedXYData (Float32Array with subarray view), and traditional array-of-objects - toggle between formats with 100k points per series