@opendata-ai/openchart-core 6.25.2 → 6.25.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendata-ai/openchart-core",
3
- "version": "6.25.2",
3
+ "version": "6.25.4",
4
4
  "description": "Types, theme, colors, accessibility, and utilities for openchart",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Riley Hilliard",
@@ -127,6 +127,7 @@ export type {
127
127
  GraphSpecWithoutData,
128
128
  LabelConfig,
129
129
  LabelDensity,
130
+ LabelSpec,
130
131
  LayerSpec,
131
132
  LegendConfig,
132
133
  LinearGradient,
package/src/types/spec.ts CHANGED
@@ -705,6 +705,9 @@ export interface LabelConfig {
705
705
  offsets?: Record<string, AnnotationOffset>;
706
706
  }
707
707
 
708
+ /** Shorthand: `false` disables all labels, `true` uses defaults, or pass a full config object. */
709
+ export type LabelSpec = boolean | LabelConfig;
710
+
708
711
  // ---------------------------------------------------------------------------
709
712
  // Legend configuration
710
713
  // ---------------------------------------------------------------------------
@@ -813,7 +816,7 @@ export interface ChartSpecOverride {
813
816
  /** Override editorial chrome at this breakpoint. */
814
817
  chrome?: Chrome;
815
818
  /** Override label configuration at this breakpoint. */
816
- labels?: LabelConfig;
819
+ labels?: LabelSpec;
817
820
  /** Override legend configuration at this breakpoint. */
818
821
  legend?: LegendConfig;
819
822
  /** Override annotations at this breakpoint. */
@@ -846,8 +849,8 @@ export interface ChartSpec {
846
849
  chrome?: Chrome;
847
850
  /** Data annotations (text callouts, highlighted ranges, reference lines). */
848
851
  annotations?: Annotation[];
849
- /** Label display configuration (density, format). */
850
- labels?: LabelConfig;
852
+ /** Label display configuration. `false` disables all labels, `true` uses defaults. */
853
+ labels?: LabelSpec;
851
854
  /** Legend display configuration (position override). */
852
855
  legend?: LegendConfig;
853
856
  /** Whether the chart adapts to container width. Defaults to true. */
@@ -1019,8 +1022,8 @@ export interface LayerSpec {
1019
1022
  chrome?: Chrome;
1020
1023
  /** Annotations on the layered view. */
1021
1024
  annotations?: Annotation[];
1022
- /** Label display configuration. */
1023
- labels?: LabelConfig;
1025
+ /** Label display configuration. `false` disables all labels, `true` uses defaults. */
1026
+ labels?: LabelSpec;
1024
1027
  /** Legend display configuration. */
1025
1028
  legend?: LegendConfig;
1026
1029
  /** Whether the chart adapts to container width. Defaults to true. */