@knpkv/rly 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -204,12 +204,33 @@ never reads as 0%. Under forced colours the track keeps a `CanvasText` edge. Pas
204
204
  to expose it as a meter instead. With `value={null}`, it is a named image whose
205
205
  accessible label combines `label` and `valueText`, without a numeric range.
206
206
 
207
+ `StackedBars` stacks values per period on a time axis, with optional `bands` of
208
+ limit levels above the bars on the same axis, and an optional `window` (such as the
209
+ current limit window) shaded across bands and bars and named in a key under the axis. Narrow containers bin periods so every
210
+ bar's hit area stays at least 24px wide, a full pointer target (the drawn fill is 2px narrower, for the gap). The plot is one tab stop: ←/→ move and select, Shift
211
+ extends, Home/End jump and Escape clears. Click selects, and Shift+click or a second
212
+ tap elsewhere extends the span. The caller owns `selection` and words it through
213
+ `describeSelection`. Only a selection the user makes is announced, politely, once it
214
+ settles: the first render and a data refresh under the same selection stay quiet. Charts
215
+ are presentation only: the application computes columns, bands and any projection.
216
+ `columns` must be in time order without overlaps (gaps are fine), or the chart throws an error naming
217
+ the first column out of place. Every bar stacks its series in one chart-wide order, the order
218
+ each id first appears. Bins group every N columns, so hourly columns that start on the
219
+ hour bin on clock hours. The selection is outlined above the bars, and the window is a
220
+ neutral dashed stretch, never the focus colour. A chart on a surface other than
221
+ `surface-1` sets `--rly-stacked-bars-gap` to that background, so the gaps between bars
222
+ match it.
223
+ Everything the bands draw is named in that key in the caller's words: each band's
224
+ `near: { level, label }` mark, and `noReadingLabel`, which is required once any band has
225
+ a stretch with `level: null`. Zero, negative and non-finite values draw nothing.
226
+
207
227
  `TrackKey` explains the marks the tracks draw, listing only the marks in use.
208
228
  `ChartLegend` says which colour is which series, with the swatch before each label.
209
229
  Series colours are the tokens `--rly-color-series-1` to `-8` plus
210
230
  `--rly-color-series-other` for folded series. Use `rlySeriesColor(series)` in SVG
211
231
  fills, and keep an id on the same slot while it is visible. Colour is never the only
212
- carrier: every chart ships a labelled key and a table equivalent, and forced-colours
232
+ carrier: every chart ships a labelled key and a table equivalent (a readable-resolution
233
+ table, each band's intervals, and a selection announcement naming every series' value), and forced-colours
213
234
  mode collapses the series to `CanvasText`.
214
235
 
215
236
  ```tsx