@opendata-ai/openchart-core 6.6.0 → 6.7.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
@@ -609,6 +609,8 @@ interface LabelConfig {
609
609
  density?: LabelDensity;
610
610
  /** Number format override for label values (d3-format string, e.g. ",.0f"). */
611
611
  format?: string;
612
+ /** Literal string prepended to each formatted label value (e.g. "-" or "$"). */
613
+ prefix?: string;
612
614
  /** Per-series pixel offsets for fine-tuning label positions, keyed by series name. */
613
615
  offsets?: Record<string, AnnotationOffset>;
614
616
  }
@@ -2595,14 +2597,14 @@ declare function computeChrome(chrome: Chrome | undefined, theme: ResolvedTheme,
2595
2597
  */
2596
2598
  declare function estimateTextWidth(text: string, fontSize: number, fontWeight?: number): number;
2597
2599
  /**
2598
- * Width reserved for the "OpenData" brand watermark in the bottom-right corner.
2599
- * Accounts for ~8 chars at font size 20 with mixed 500/600 weight, plus a gap
2600
+ * Width reserved for the "tryOpenData.ai" brand watermark in the bottom-right corner.
2601
+ * Accounts for ~14 chars at font size 12 with mixed weights, plus a gap
2600
2602
  * so adjacent text doesn't crowd it. Used by chrome and legend layout to avoid
2601
2603
  * overlapping the brand.
2602
2604
  */
2603
2605
  declare const BRAND_RESERVE_WIDTH = 110;
2604
2606
  /** Font size of the brand watermark (px). Shared between layout and renderer. */
2605
- declare const BRAND_FONT_SIZE = 20;
2607
+ declare const BRAND_FONT_SIZE = 12;
2606
2608
  /** Minimum chart width to render the brand watermark (px). */
2607
2609
  declare const BRAND_MIN_WIDTH = 120;
2608
2610
 
package/dist/index.js CHANGED
@@ -1043,7 +1043,7 @@ function estimateTextWidth(text, fontSize, fontWeight = 400) {
1043
1043
  return text.length * estimateCharWidth(fontSize, fontWeight);
1044
1044
  }
1045
1045
  var BRAND_RESERVE_WIDTH = 110;
1046
- var BRAND_FONT_SIZE = 20;
1046
+ var BRAND_FONT_SIZE = 12;
1047
1047
  var BRAND_MIN_WIDTH = 120;
1048
1048
  function estimateTextHeight(fontSize, lineCount = 1, lineHeight = 1.3) {
1049
1049
  return fontSize * lineHeight * lineCount;