One Style, One Parameter: How CanvasXpress Simplified Theming for Charts and Widgets
If you've ever styled a CanvasXpress chart alongside its data-table widgets, legend controls, or toolbar, you've probably run into a small but persistent annoyance: there was more than one place to say "make this look like X." The chart itself had a theme. The surrounding UI widgets had a separate dataUIStyle with its own list of names. And if you were also theming a dashboard page around your chart, there was a third style picker for that. Three knobs, three vocabularies, one intention — "I want my chart and its chrome to look like this."
CanvasXpress now collapses that into a single idea: theme describes the whole look, chart and widgets together, and dataUIStyle no longer competes with it — it has a narrower, much more useful job as a frame-density control that layers on top of any theme you choose.
Why this matters
Previously, picking a color scheme for your widgets (say, bms or colorful) and picking a chart theme (say, economist or ggplot) were unrelated decisions made in unrelated places, and if you tried to combine them you could get silent conflicts — one style quietly overriding the other's colors. Most users just wanted a cohesive look without having to understand which setting governed which part of the screen.
With the unified model, theme is the one parameter you reach for. Many of the familiar names — paper, slate, mono, sunrise, ocean, midnight, graphite, forest — now style both the chart and its widgets consistently out of the box. Classic chart themes like economist, ggplot, and wsj keep rendering the chart exactly as before, with sensible default widget styling alongside them. And the legacy widget-only looks you may already depend on — modern, old, bms, colorful, rdc, ngs360 — are still there, now simply understood as "widgets-only" styles within the same single system.
Setting chart and widget styles independently, when you need to
Sometimes you genuinely want a specific chart theme paired with a specific widget look — an economist-style chart next to bms-colored controls, for example. The unified model supports this with a compound form, so you're never forced to settle for a single combined preset when you want to mix and match:
var cx = new CanvasXpress("chart1", data, {
graphType: "Bar",
theme: ["economist", "bms"]
});
The first element is the chart theme, the second is the widgets style. If you prefer configuration as plain strings (handy in JSON files or templates), the same idea is expressed as "economist+bms". Leave the second part off and CanvasXpress fills in sensible widget defaults for that chart theme automatically.
dataUIStyle now means frame density
The biggest simplification is what happened to dataUIStyle. It used to carry nine different "looks" that were really just color presets wearing a widget-styling hat — exactly the kind of thing theme now handles. So dataUIStyle has been refocused on the one thing it did that was genuinely orthogonal to color: how much visual framing your tables and widgets show.
It now accepts exactly three values:
default— the standard lookstripped— faint inner borders, a cleaner, lighter tableminimal—strippedplus hairline outer frames, for the most understated presentation
And crucially, density composes with any theme. Want an ocean-themed chart with the most minimal, borderless widget framing? That's a one-line combination:
cx.updateConfig({
theme: "ocean",
dataUIStyle: "minimal"
}, true);
This is the part worth underlining: before, choosing a color-driven dataUIStyle like bms meant you couldn't also dial in stripped or minimal framing without picking one or the other. Now they're independent decisions — pick your palette with theme, pick your framing with dataUIStyle, and CanvasXpress merges them cleanly.
Nothing breaks
If you have existing configurations using any of the old dataUIStyle color presets — modern, cx, colorful, bms, old, rdc, ngs360, and the rest — they keep working exactly as written. Under the hood, those values are now treated as deprecated aliases that fill in the widgets portion of the unified style, so your charts render pixel-for-pixel the way they always have. And if you were already using stripped or minimal on their own, without any color style layered in, they retain their original grey appearance precisely as before. There's no migration required to keep your current look; the simplification is additive, not disruptive.
The takeaway
Theming a CanvasXpress chart and its surrounding widgets used to require juggling multiple settings with overlapping vocabularies and occasional silent conflicts. Now it's one coherent model: theme decides what everything looks like — chart and widgets — with an optional second slot when you want to mix a specific chart theme with a specific widget palette, and dataUIStyle has been freed up to do one job well: controlling how much visual framing your tables and controls carry. Fewer concepts, more predictable combinations, and a styling API that finally matches how people actually think about the problem — "I want this look," not "which of three settings controls this part of the screen."
Give it a try on your next chart: pick a theme, layer on a dataUIStyle density if you want a lighter touch, and see how much simpler a cohesive look becomes.