Rendering Omics-Scale Scatter Plots: How CanvasXpress Stays Fast at a Million Points
Modern single-cell, genomics, and proteomics workflows routinely produce scatter plots with tens of thousands to over a million data points — UMAP and t-SNE embeddings, variant calls, expression matrices. Rendering that many marks in a browser canvas, and then keeping the chart interactive (panning, zooming, toggling a legend, resizing a panel) without the UI stalling, is a genuinely hard problem. CanvasXpress tackles it from two directions: automatic point decimation that keeps the typical chart cheap to draw, and a set of engine-level performance improvements that make redraws and reloads dramatically faster on large, spread-out datasets.
Decimation you don't have to think about
For most real-world scatter plots — gene expression clouds, QC plots, dense clusters — many points overlap at the pixel level. CanvasXpress detects when a scatter plot has enough points that individual marks would simply stack on top of one another, and automatically collapses those overlapping points down to a single representative mark per occupied screen region. Below that threshold, every point is drawn exactly as given — nothing changes in the visual output you're used to.
The practical effect: a 100,000-point scatter plot that would otherwise emit 100,000 draw calls might only need to emit a few thousand marks to produce a pixel-identical plot, because the rest are hidden behind others anyway. This happens transparently — there's no flag to flip and no extra configuration to maintain. You load your data, CanvasXpress renders a chart that looks like the full dataset, and the renderer quietly does less work to get there.
This matters most for tightly clustered data, where decimation is highly effective. It's worth knowing, though, that decimation is driven by actual screen overlap — a widely dispersed embedding (for example, a well-separated single-cell UMAP plot where most points occupy distinct pixels) will retain the vast majority of its points, because the plot genuinely needs them to preserve its shape. For that kind of dataset, the recent engine work described below is where the real speed gains show up.
Faster redraws, especially on large, spread-out data
A scatter plot isn't static — you zoom, you pan, you toggle a series in the legend, you resize the panel, you select a subset of points. Each of those operations triggers a redraw, and on large datasets, the per-redraw cost used to scale with the raw number of underlying rows, not just the number of marks on screen.
Recent engine improvements target exactly this. CanvasXpress now caches parts of the internal indexing and ordering work it previously rebuilt from scratch on every redraw, so operations like hiding a series, panning, or resizing reuse that work instead of recomputing it. On large datasets (hundreds of thousands to a million points), this has produced several-fold reductions in redraw time for view-preserving interactions — the chart stays responsive even after the initial load.
The initial load itself also got faster. CanvasXpress's internal data-wrangling pipeline — the step that reshapes your incoming data into the matrix the renderer consumes — now recognizes a common case (ungrouped data with unique names, no transformation) and takes a more direct path to the same result, skipping redundant reshaping work. For large single- or multi-hundred-thousand-point datasets, this meaningfully cuts the time to first paint.
None of this changes how you use CanvasXpress. You construct and update charts exactly as before:
var cx = new CanvasXpress("myChart", data, config);
// Toggle something in the config (e.g., a legend state, color scheme) and redraw
cx.updateConfig({ legendOrder: ["A", "B", "C"] }, true);
// Swap in a new dataset entirely
cx.updateData(newData, true);
// Resize the chart — common in responsive dashboards
cx.setDimensions(900, 600);
// Inspect the resolved configuration at any time
var currentConfig = cx.getConfig();
Each of these calls triggers a redraw under the hood, and it's precisely that redraw path — not the initial construction — that benefits most from the recent engine work. If you're building a dashboard where users repeatedly filter, recolor, or resize a large scatter plot, this is where you'll feel the difference most directly.
Keeping large charts reproducible
Because this work preserves output byte-for-byte on every chart that doesn't hit the large-dataset path, you can trust that existing saved charts and workflows behave identically. CanvasXpress's toolbar still lets you Save as JSON to serialize a chart's data and configuration, and dropping that saved file back onto a chart container reloads it exactly as it was. The toolbar's Reproduce action still replays a chart's construction step by step — useful for sharing a complex large-scale scatter plot with a colleague, or for confirming that a chart renders identically across sessions and browsers.
Why this matters
If you work with omics-scale data, you've likely hit the point where a scatter plot technically renders but feels sluggish the moment you interact with it — a legend toggle that takes a visible beat, a resize that stutters. The combination of automatic, shape-preserving decimation and faster underlying redraw and load paths means CanvasXpress can handle that scale of data as a first-class use case rather than an edge case you have to work around.
You don't need to change how you build charts to get these benefits — load your data, configure your scatter plot as usual, and CanvasXpress does the work of keeping it fast. For teams visualizing hundred-thousand- to million-point embeddings, that translates directly into less time waiting on the chart and more time exploring the data.