Docs Reference & maintenance

Migrating 0.5 -> 0.6

0.6.0 is the charting realignment release. The analytical layer still explains figures, but it no longer pretends CSS can be a chart renderer: scales, domains, axes and data binding belong to a chart engine.

There is one breaking change. The data-viz palette (--chart-*, tokens/charts.json) and the standalone Legends layer are unchanged. The machine-readable map is MIGRATIONS.json.

1. Replace the removed .ui-chart* renderer

The static bar-chart classes were removed:

ui-chart
ui-chart__plot
ui-chart__bar
ui-chart__label
ui-chart__track
ui-chart__fill
ui-chart__fallback
ui-chart__caption

There is no safe class rename. Find call sites first:

rg -n 'ui-chart\b|ui-chart__' .

For live or data-driven charts, migrate to Vega-Lite and apply the Bronto theme config:

import { brontoVegaConfig } from '@ponchia/ui/vega';

vegaEmbed('#chart', spec, {
  config: brontoVegaConfig(document.documentElement.dataset.theme || 'light'),
  renderer: 'svg',
  actions: false,
});

Wrap the rendered chart in report chrome and keep the data key in the standalone legend layer:

<figure class="ui-report__figure">
  <div id="chart"></div>
  <figcaption class="ui-report__caption">Latency by region.</figcaption>
  <ul class="ui-legend">
    <li class="ui-legend__item">
      <span class="ui-legend__swatch ui-legend__swatch--1"></span>
      <span class="ui-legend__label">EU West</span>
    </li>
  </ul>
</figure>

For frozen print charts with no runtime, hand-author an inline <svg> using the resolved --chart-* palette or tokens/charts.json.

2. Remove --chart-value

The old renderer's per-bar --chart-value knob is gone with the renderer. Keep using --chart-color and --chart-pattern on .ui-legend__swatch; those belong to the unchanged Legends layer.

3. Import the new chart theme helper only when needed

@ponchia/ui/vega and vega.json are config/data only. Vega, Vega-Lite and vega-embed remain consumer dependencies; Bronto does not bundle a chart engine. See docs/vega.md for the browser, CDN and static-report recipes.

Re-pin

// package.json — 0.6 is a breaking minor under the pre-1.0 policy
"@ponchia/ui": "~0.6.0"