@opendata-ai/openchart-core 6.27.0 → 6.27.2

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/dist/index.d.ts CHANGED
@@ -393,7 +393,15 @@ interface EncodingChannel {
393
393
  * - undefined | true | 'zero': stack from zero baseline (default)
394
394
  * - 'normalize': stack and normalize to fraction of total (0-1 per category)
395
395
  * - 'center': center stacks around zero (streamgraph style)
396
- * - null | false: no stacking (grouped/dodged side-by-side)
396
+ * - null | false: no stacking -- renders grouped (side-by-side) bars instead
397
+ *
398
+ * Use `stack: null` to get grouped/dodged bars. This is the idiomatic way to
399
+ * compare values across categories side-by-side rather than stacked on top of
400
+ * each other. Without it, multi-series bar data stacks by default.
401
+ *
402
+ * @example
403
+ * // Side-by-side grouped bars (comparing 2018 vs 2022 wages by firm size):
404
+ * "x": { "field": "pay", "type": "quantitative", "stack": null }
397
405
  */
398
406
  stack?: boolean | 'zero' | 'normalize' | 'center' | null;
399
407
  /**
@@ -1542,6 +1550,11 @@ declare const elementRef: {
1542
1550
  * Fired by the `onEdit` callback when any editable chart element is modified.
1543
1551
  * Covers repositioning (drag), deletion (Delete key), and text editing (double-click).
1544
1552
  * Selection events (onSelect/onDeselect) are separate callbacks, not part of this union.
1553
+ *
1554
+ * For the `annotation` variant:
1555
+ * - `annotation` is the ORIGINAL spec annotation (may have a stale or missing offset)
1556
+ * - `offset` is the NEW accumulated position after the drag completes
1557
+ * - To persist a drag edit back into your spec: `{ ...edit.annotation, offset: edit.offset }`
1545
1558
  */
1546
1559
  type ElementEdit = {
1547
1560
  type: 'annotation';