@opendata-ai/openchart-core 6.25.3 → 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/dist/index.d.ts +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/types/index.ts +1 -0
- package/src/types/spec.ts +8 -5
package/package.json
CHANGED
package/src/types/index.ts
CHANGED
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?:
|
|
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
|
|
850
|
-
labels?:
|
|
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?:
|
|
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. */
|