@opendata-ai/openchart-core 6.24.2 → 6.25.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
@@ -320,6 +320,8 @@ interface AxisConfig {
320
320
  titlePadding?: number;
321
321
  /** Padding between tick labels and axis. */
322
322
  labelPadding?: number;
323
+ /** Color override for axis tick labels and title. Useful in dual-axis charts to match axis color to its series. */
324
+ labelColor?: string;
323
325
  }
324
326
  /** Scale configuration for an encoding channel. */
325
327
  interface ScaleConfig {
@@ -1805,6 +1807,8 @@ interface LineMark {
1805
1807
  aria: MarkAria;
1806
1808
  /** Index for stagger animation ordering. */
1807
1809
  animationIndex?: number;
1810
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
1811
+ yScale?: 'y' | 'y2';
1808
1812
  }
1809
1813
  /**
1810
1814
  * Area mark: a filled region bounded by a top line and a baseline.
@@ -1846,6 +1850,8 @@ interface AreaMark {
1846
1850
  aria: MarkAria;
1847
1851
  /** Index for stagger animation ordering. */
1848
1852
  animationIndex?: number;
1853
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
1854
+ yScale?: 'y' | 'y2';
1849
1855
  }
1850
1856
  /**
1851
1857
  * Rect mark: a rectangle.
@@ -1883,6 +1889,8 @@ interface RectMark {
1883
1889
  stackGroup?: string;
1884
1890
  /** Position of this segment within its stack group (0, 1, 2...). Set by engine for stacked bars. */
1885
1891
  stackPos?: number;
1892
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
1893
+ yScale?: 'y' | 'y2';
1886
1894
  }
1887
1895
  /**
1888
1896
  * Arc mark: a pie/donut slice.
@@ -1947,6 +1955,8 @@ interface PointMark {
1947
1955
  aria: MarkAria;
1948
1956
  /** Index for stagger animation ordering. */
1949
1957
  animationIndex?: number;
1958
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
1959
+ yScale?: 'y' | 'y2';
1950
1960
  }
1951
1961
  /**
1952
1962
  * Text mark: data-positioned text label.
@@ -1980,6 +1990,8 @@ interface TextMarkLayout {
1980
1990
  aria: MarkAria;
1981
1991
  /** Index for stagger animation ordering. */
1982
1992
  animationIndex?: number;
1993
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
1994
+ yScale?: 'y' | 'y2';
1983
1995
  }
1984
1996
  /**
1985
1997
  * Rule mark: a line segment between two points.
@@ -2009,6 +2021,8 @@ interface RuleMarkLayout {
2009
2021
  aria: MarkAria;
2010
2022
  /** Index for stagger animation ordering. */
2011
2023
  animationIndex?: number;
2024
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
2025
+ yScale?: 'y' | 'y2';
2012
2026
  }
2013
2027
  /**
2014
2028
  * Tick mark: a short line segment at a data coordinate.
@@ -2036,6 +2050,8 @@ interface TickMarkLayout {
2036
2050
  aria: MarkAria;
2037
2051
  /** Index for stagger animation ordering. */
2038
2052
  animationIndex?: number;
2053
+ /** Which y-scale produced this mark ('y' = left, 'y2' = right). */
2054
+ yScale?: 'y' | 'y2';
2039
2055
  }
2040
2056
  /** Discriminated union of all mark types. */
2041
2057
  type Mark = LineMark | AreaMark | RectMark | ArcMark | PointMark | TextMarkLayout | RuleMarkLayout | TickMarkLayout;
@@ -2189,6 +2205,8 @@ interface ChartLayout {
2189
2205
  axes: {
2190
2206
  x?: AxisLayout;
2191
2207
  y?: AxisLayout;
2208
+ /** Right-side y-axis for independent-scale layers (dual-axis charts). */
2209
+ y2?: AxisLayout;
2192
2210
  };
2193
2211
  /** Data marks: the visual representation of data points. */
2194
2212
  marks: Mark[];
@@ -2583,6 +2601,8 @@ interface CompileOptions {
2583
2601
  * If not provided, the engine falls back to heuristic estimation.
2584
2602
  */
2585
2603
  measureText?: MeasureTextFn;
2604
+ /** Extra pixels to reserve on the right margin for a secondary y-axis. Set by compileLayer when resolve.scale.y is 'independent'. */
2605
+ rightAxisReserve?: number;
2586
2606
  }
2587
2607
  /** Extended compile options for table visualizations. */
2588
2608
  interface CompileTableOptions extends CompileOptions {