Shelf-Style Authoring in CanvasXpress: Drag-and-Drop Charting for Everyone
If you've ever used Tableau, you know the feeling: drag a field onto a shelf, and the chart just updates. Color, size, shape, rows, columns — all negotiated visually, with immediate feedback. Building the same result from a form-driven configuration panel, by contrast, can feel like assembling furniture from written instructions instead of just snapping the pieces together.
CanvasXpress now closes that gap with Shelves — a new section inside the Customizer that gathers the chart's visual encodings, facets, and filters into one drag-and-drop authoring surface. It doesn't replace anything you already know about CanvasXpress; it's a better front door onto capabilities the library already has, arranged the way visual-analytics users expect them to be arranged.
One place for the decisions that shape your chart
Open the Customizer and look for Shelves in the left-hand navigation. Instead of hunting across separate Meta, Axes, and Options tabs to find where color, size, shape, or mark type live, Shelves puts them together:
- Marks card — droppable slots for Color, Size, and Shape. Drag a field pill onto any slot and the chart re-renders with that encoding applied immediately.
- Facets card — a droppable Segregate slot, the CanvasXpress analog to Tableau's Columns/Rows. Because CanvasXpress charts are built on a variables-by-samples matrix rather than a freely reshapable table, facets work by splitting into small multiples: drop a sample-level field to facet across samples, or a variable-level field to facet across variables. It's the same underlying mechanism you'd reach for with
segregate/desegregate, just exposed as a shelf. - Filters card — drop a field here and it turns into an inline checklist of that field's values, right inside the Shelves panel. Toggle values on or off and the chart filters in place — no need to leave the authoring view to find a separate filter dialog. A small ✕ next to each active filter removes it when you're done exploring.
Every drop still runs through CanvasXpress's existing configuration pipeline, which means the results are exactly what you'd get by editing the chart's underlying configuration by hand — Shelves is a visual layer over real, inspectable settings.
Fields sorted the way analysts think about them
The field palette that feeds the shelves is grouped the way Tableau users expect: Dimensions (categorical fields — strings, unique identifiers) on one side, Measures (numeric fields) on the other. Under the hood this is the same field metadata CanvasXpress already tracks for every sample and variable annotation; Shelves simply classifies and labels it so you immediately know which pills are safe to drop on Color versus which belong on Size.
This distinction pays off the moment you start customizing further. Right-click a pill in the palette and a context menu opens with role-appropriate actions:
- On a Measure, you can jump straight into binning it into ranges, aggregating it, or turning it into a calculated field.
- On a Dimension, you get a shortcut to aggregate the chart's data grouped by that field, or to build a calculated field from it.
Each of these opens the same dialog you'd reach from elsewhere in the Customizer, just pre-filled with the field you right-clicked — so the shelf-driven workflow and the deeper data-preparation tools (calculated fields, binning, aggregation) feel like one continuous path rather than separate tools.
Why this works so smoothly
Shelves isn't a new drag-and-drop engine bolted onto CanvasXpress — it's a reorganization of the drag-and-drop system the Customizer already had. Every shelf drop resolves to the same configuration actions that power the Meta, Axes, and Filter panels today. That matters for two practical reasons:
- Consistency. A chart built by dragging fields onto Shelves produces the same configuration as one built through the traditional panels. Nothing is "shelf-only" or hidden from the rest of the Customizer.
- Reliability. Because the underlying mechanics are the same battle-tested code paths, Shelves inherits their behavior rather than introducing a parallel, less-tested way of mutating your chart.
You can move fluidly between the two styles — start with Shelves to get a chart roughed in quickly, then dive into Axes or Options for fine control, and the chart stays consistent throughout.
A quick example to set the stage
Shelves lives entirely inside the visual Customizer UI, so there's no new API to memorize for dragging pills onto slots. But everything you build with Shelves is still just a CanvasXpress chart underneath, constructed and updated the usual way:
var cx = new CanvasXpress("canvasId", data, {
graphType: "Scatter2D"
});
Once the chart is on the page, open its Customizer, click Shelves, and start dragging fields onto Marks, Facets, or Filters. Behind the scenes, each drop is really just an update to the chart's configuration — the same configuration you can always inspect with cx.getConfig(), or push programmatically with cx.updateConfig(...) if you want to script a variation of what you built by hand.
When you've arrived at a chart worth keeping, use the toolbar's Save Current as JSON action to capture it. That saved file can later be dropped straight back onto the chart container to reload the exact same state, or replayed step-by-step with the toolbar's Reproduce action — handy for sharing a chart's construction with a colleague or for documenting how you got from raw data to a finished view.
The bigger picture
Shelves is the authoring capstone for a set of CanvasXpress data-preparation features that have been building toward exactly this moment — calculated fields, binning, and aggregation all now have a natural home to be discovered and applied from, right next to the encodings they feed. Together, they turn CanvasXpress's Customizer from a powerful but panel-heavy configuration tool into something closer to a visual analytics workbench: drag a field, see a chart, refine it, save it, share it.
If you've been reaching for a different tool just to get that "drag it and see it" feeling, it's worth opening the Customizer and clicking Shelves.