@opendata-ai/openchart-core 7.2.2 → 7.2.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": "7.2.2",
3
+ "version": "7.2.4",
4
4
  "description": "Types, theme, colors, accessibility, and utilities for openchart",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Riley Hilliard",
@@ -42,6 +42,8 @@ export const DEFAULT_THEME: Theme = {
42
42
  body: 13,
43
43
  small: 11,
44
44
  axisTick: 11,
45
+ metricLabel: 10,
46
+ metricValue: 22,
45
47
  },
46
48
  weights: {
47
49
  normal: 450,
package/src/types/spec.ts CHANGED
@@ -767,6 +767,10 @@ export interface RefLineAnnotation extends AnnotationBase {
767
767
  labelOffset?: AnnotationOffset;
768
768
  /** Anchor direction for the reference line label. */
769
769
  labelAnchor?: AnnotationAnchor;
770
+ /** Label font size in pixels. Default: 11. */
771
+ fontSize?: number;
772
+ /** Label font weight. Default: 400. */
773
+ fontWeight?: number;
770
774
  }
771
775
 
772
776
  /** Discriminated union of all annotation types. */
@@ -838,6 +842,10 @@ export interface ThemeConfig {
838
842
  small?: number;
839
843
  /** Axis tick labels. Default: 11. */
840
844
  axisTick?: number;
845
+ /** KPI metric uppercase label. Default: 10. */
846
+ metricLabel?: number;
847
+ /** KPI metric primary value. Default: 22. Delta/secondary derive from this. */
848
+ metricValue?: number;
841
849
  };
842
850
  };
843
851
  /** Spacing overrides in pixels. */
@@ -51,6 +51,11 @@ export interface ThemeFontSizes {
51
51
  small: number;
52
52
  /** Axis tick label font size in pixels. */
53
53
  axisTick: number;
54
+ /** KPI metric uppercase label font size in pixels. */
55
+ metricLabel: number;
56
+ /** KPI metric primary value font size in pixels. The delta and secondary
57
+ * values derive from this (each ~0.55x), so scaling this scales the whole cell. */
58
+ metricValue: number;
54
59
  }
55
60
 
56
61
  /** Font weight presets. */