A Unified Design System: One Consistent, Themeable UI Across CanvasXpress

If you've built dashboards or embedded multiple CanvasXpress charts on the same page, you may have noticed small inconsistencies in the "chrome" around your visualizations — the toolbar, the Customizer panel, data filters, tooltips, context menus, and dialog boxes. A button here looked slightly different from a button there. Dark mode worked for the chart canvas but left the surrounding controls stubbornly light. z-index collisions occasionally caused a dropdown to hide behind a modal it should have been on top of.

We set out to fix that at the source, and the result is now shipping: a single, token-driven design system that powers every widget in CanvasXpress — and, for teams building on CanvasXpress Dashboards, the same system powers the dashboard shell, builder toolbar, and example pages too. One set of colors, radii, spacing, typography, and z-index rules, used everywhere, with full backward compatibility for every existing customization.

What changed for you

Nothing you've built will break. Every dataUIStyle preset — cx, stripped, modern, old, bms, colorful, rdc, ngs360 — still works exactly as before. Every --cx-* CSS custom property you've ever overridden still works; the old names are preserved as aliases pointing at the new, semantic token layer underneath. If you've never touched any of this, your charts will simply look a little more polished and a lot more consistent — tighter shared button and modal styling, cleaner panels, and no more stray hardcoded colors peeking out from a dialog box.

The two headline user-facing wins are:

1. One real dark mode, everywhere

Previously, setting a dark chart theme only darkened the chart canvas. The toolbar, Customizer, data filter panel, context menus, and the data table around it stayed light, which looked jarring on a dark page. Now there is a single theme mechanism that the entire UI follows — chart chrome, dialogs, menus, tooltips — driven from the chart's own theme setting (or from the nearest themed container it's embedded in).

Switching a chart (and all of its surrounding widgets) into dark mode is as simple as setting the theme in your configuration and letting the whole interface follow:

var cx = new CanvasXpress("chartCanvas", data, {
  graphType: "Scatter2D",
  theme: "cxdark",
  dataUIStyle: "modern"
});

If you need to flip the theme after the fact — say, in response to a user toggling dark mode on your page — just update the config and redraw:

cx.updateConfig({ theme: "cxdark" }, true);

Every contrast pairing in both the light and dark palettes has been checked against accessibility (AA) contrast guidelines, so your dark dashboards aren't just dark — they're legible.

2. Consistent, de-duplicated widget styling

Buttons, modals, tooltips, menus, and form controls across the Customizer, Data Filters, Data Table, Workflow player, Chat panel, and Code Viewer now draw from one shared set of primitive components and design tokens — consistent radii, spacing, typography, and a single accent color — instead of each widget carrying its own one-off styling. Dialogs that used to be assembled with inline styles now share the same visual language as the rest of the interface, so a calculated-field dialog, an aggregate dialog, and the Workflow history player all feel like parts of the same product.

This also fixed a handful of small but real visual bugs along the way — for example, tooltip callout arrows now render correctly as pointed arrows rather than square tabs in the production CSS, and a checkbox accent-color mismatch in dashboard filter panels has been corrected.

Theming through configuration, not CSS surgery

Because all of this routes through the same dataUIStyle presets and --cx-* custom properties you already know, you don't need to learn a new system to theme your charts. If you've been overriding colors via CSS custom properties on your page, those overrides still take precedence exactly as they did before — the new semantic token layer sits underneath your overrides, not on top of them.

If you want to inspect exactly what configuration (including UI style and theme) a chart is currently running with — useful when debugging a page with several charts in different states — you can always read it back:

var currentConfig = cx.getConfig();

And if you resize a chart and its surrounding widgets together, the standard dimension call still works as expected:

cx.setDimensions(900, 600);

Reproducibility, unaffected

None of this touches how you save, share, or reproduce your work. The Save as JSON action in the chart toolbar still serializes your chart exactly as before, drag-and-drop reload of a saved .json file still works, and the Reproduce toolbar action still replays a chart's construction step by step — now simply rendering through a cleaner, more consistent UI while it does.

Why this matters for dashboards

If you're building with CanvasXpress Dashboards, the benefit compounds. Dashboard pages already load the core CanvasXpress stylesheet, and now the dashboard shell, builder toolbar, filter panels, and modal dialogs all consume the same tokens and shared components instead of maintaining their own parallel styling. That means a dashboard you build today will automatically pick up the same dark-mode behavior, the same button and modal treatment, and the same accent color as the charts embedded inside it — no more mismatched palettes between the chart chrome and the dashboard chrome that wraps it.

The takeaway

You don't have to do anything to benefit from this. Your existing dataUIStyle choices, CSS overrides, and chart configurations keep working unchanged. What you get for free is a more coherent, more accessible, and now fully dark-mode-capable interface across every CanvasXpress widget — whether you're looking at a single embedded chart or a full multi-panel dashboard.

Try switching an existing chart to theme: "cxdark" and take a look at the Customizer panel, data filters, or the Workflow player alongside it — you'll notice the whole interface now moves together.