@opendata-ai/openchart-core 9.2.3 → 9.3.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/dist/index.d.ts CHANGED
@@ -6711,6 +6711,15 @@ type ElementRef = {
6711
6711
  index: number;
6712
6712
  /** Root-relative RFC 6901 JSON Pointer to the authored object this ref identifies (e.g. `/layer/0/annotations/2`, `/chrome/title`). Always set on refs the chart emits or returns; legend refs point at `/legend`. Edited properties are addressed by `EditOp.path`. */
6713
6713
  path?: string;
6714
+ } | {
6715
+ /** A table column, as a table in `select` mode emits it. */
6716
+ type: 'column';
6717
+ /** The column's data key. */
6718
+ key: string;
6719
+ /** Position in the spec's `columns` array; tells two columns with one key apart. */
6720
+ index: number;
6721
+ /** `/columns/<index>` */
6722
+ path?: string;
6714
6723
  };
6715
6724
  /** Helper constructors for ergonomic ElementRef creation. */
6716
6725
  declare const elementRef: {
@@ -6720,6 +6729,7 @@ declare const elementRef: {
6720
6729
  readonly chrome: (key: ChromeKey, path?: string) => ElementRef;
6721
6730
  readonly legend: (path?: string) => ElementRef;
6722
6731
  readonly legendEntry: (series: string, index: number, path?: string) => ElementRef;
6732
+ readonly column: (key: string, index: number, path?: string) => ElementRef;
6723
6733
  };
6724
6734
  /**
6725
6735
  * Event fired when a user interacts with a data mark (bar, point, line segment, etc.).
package/dist/index.js CHANGED
@@ -391,6 +391,12 @@ var elementRef = {
391
391
  series,
392
392
  index,
393
393
  ...path !== void 0 ? { path } : {}
394
+ }),
395
+ column: (key, index, path) => ({
396
+ type: "column",
397
+ key,
398
+ index,
399
+ ...path !== void 0 ? { path } : {}
394
400
  })
395
401
  };
396
402