@blueprint-chart/lib 2.11.0 → 2.12.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.
@@ -29,5 +29,6 @@ export declare function parseNumberFormat(fmt: string): ParsedNumberFormat;
29
29
  export declare function buildNumberFormatter(fmt: string): ((value: number | {
30
30
  valueOf(): number;
31
31
  }) => string) | null;
32
+ export declare function formatValueLabel(value: number, format?: string): string;
32
33
  /** Render `value` as an integer percentage of `total`, e.g. 10/60 → "17%". 0% when total ≤ 0. */
33
34
  export declare function percentValueLabel(value: number, total: number): string;
@@ -3,5 +3,6 @@ export interface PaletteEntry {
3
3
  label: string;
4
4
  colors: readonly string[];
5
5
  }
6
+ export declare const DEFAULT_COLORS: string[];
6
7
  export declare function resolvePalette(paletteName: string | undefined): string[] | undefined;
7
8
  export declare function listPalettes(): PaletteEntry[];
@@ -0,0 +1,5 @@
1
+ import { SortDirection } from '../enums';
2
+ export declare function sortByValue<T>(items: readonly T[], value: (item: T, index: number) => number, direction: SortDirection | undefined): T[];
3
+ export declare function labelTotal(series: readonly {
4
+ values: number[];
5
+ }[], index: number): number;
@@ -1,3 +1,3 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLOR = "#4e79a7";
2
+ export declare const DEFAULT_COLOR: string;
3
3
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, inputData: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,4 +1,3 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
4
3
  export declare function renderArc(container: HTMLElement, data: ChartData, options: ChartOptions, innerRadiusRatio: number, transition?: boolean): void;
@@ -1,4 +1,4 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLOR = "#4e79a7";
2
+ export declare const DEFAULT_COLOR: string;
3
3
  export declare const DOT_RADIUS = 5;
4
4
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,3 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLOR = "#4e79a7";
2
+ export declare const DEFAULT_COLOR: string;
3
3
  export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,3 +1,2 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLORS: string[];
3
2
  export declare function render(container: HTMLElement, inputData: ChartData, options?: ChartOptions, transition?: boolean): void;
@@ -1,5 +1,5 @@
1
1
  import { ChartData, ChartOptions } from '../../types';
2
- export declare const DEFAULT_COLOR = "#4e79a7";
2
+ export declare const DEFAULT_COLOR: string;
3
3
  export declare const DOT_RADIUS = 4.5;
4
4
  export declare const FILL_OPACITY = 0.7;
5
5
  export declare function maxBubbleRadius(width: number, height: number): number;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as ee, I as te, It as _, J as v, Jt as ne, K as re, Kt as ie, L as ae, Lt as oe, M as y, Mt as se, N as ce, Nt as le, O as ue, Ot as de, P as b, Pt as x, Q as fe, Qt as pe, R as S, Rt as me, S as he, St as ge, T as _e, Tt as ve, U as C, Ut as ye, V as be, Vt as xe, W as Se, Wt as Ce, X as we, Xt as Te, Y as Ee, Yt as De, Z as Oe, Zt as ke, _ as Ae, _t as je, a as Me, an as Ne, at as Pe, b as Fe, bt as Ie, c as Le, cn as Re, ct as ze, d as Be, dt as Ve, en as He, et as Ue, f as We, ft as Ge, g as Ke, gt as qe, h as Je, ht as Ye, i as Xe, in as Ze, it as Qe, j as $e, jt as et, k as w, kt as T, l as tt, lt as nt, m as rt, mt as it, n as at, nn as ot, nt as st, o as ct, on as lt, ot as ut, p as dt, pt as ft, q as pt, qt as mt, r as ht, rn as gt, rt as _t, s as vt, sn as yt, st as bt, t as xt, tn as St, tt as Ct, u as wt, ut as Tt, v as Et, vt as Dt, w as Ot, wt as kt, x as At, xt as jt, y as Mt, yt as Nt, z as E, zt as Pt } from "./render-bpc-dodOcvDz.js";
1
+ import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as ee, I as te, It as _, J as v, Jt as ne, K as re, Kt as ie, L as ae, Lt as oe, M as y, Mt as se, N as ce, Nt as le, O as ue, Ot as de, P as b, Pt as x, Q as fe, Qt as pe, R as S, Rt as me, S as he, St as ge, T as _e, Tt as ve, U as C, Ut as ye, V as be, Vt as xe, W as Se, Wt as Ce, X as we, Xt as Te, Y as Ee, Yt as De, Z as Oe, Zt as ke, _ as Ae, _t as je, a as Me, an as Ne, at as Pe, b as Fe, bt as Ie, c as Le, cn as Re, ct as ze, d as Be, dt as Ve, en as He, et as Ue, f as We, ft as Ge, g as Ke, gt as qe, h as Je, ht as Ye, i as Xe, in as Ze, it as Qe, j as $e, jt as et, k as w, kt as T, l as tt, lt as nt, m as rt, mt as it, n as at, nn as ot, nt as st, o as ct, on as lt, ot as ut, p as dt, pt as ft, q as pt, qt as mt, r as ht, rn as gt, rt as _t, s as vt, sn as yt, st as bt, t as xt, tn as St, tt as Ct, u as wt, ut as Tt, v as Et, vt as Dt, w as Ot, wt as kt, x as At, xt as jt, y as Mt, yt as Nt, z as E, zt as Pt } from "./render-bpc-t7lTvln4.js";
2
2
  import { t as Ft } from "./runtime-D_vHKSyR.js";
3
3
  import D from "chroma-js";
4
4
  //#region src/recommendations/intent.ts
@@ -1272,4 +1272,4 @@ async function Qr(e, t = {}) {
1272
1272
  return l;
1273
1273
  }
1274
1274
  //#endregion
1275
- export { l as ANNOTATION_KIND_KEYWORD, de as Anchor, T as AnnotationKind, r as AnnotationLineStyle, et as ArrowDirection, se as AxisDirection, ze as BC_TRANSITION_NAME, le as ChartOptionType, Sr as ChartParseError, x as ChartType, p as CompassDirection, _ as CrosshairDirection, oe as CrosshairStyle, s as DEFAULT_BAR_GAP, me as DirectLabelMode, Pt as DotStyle, a as DslNodeType, xe as FilterCondition, ee as FrameSizing, ye as GridStyle, Ce as Interpolation, h as LabelPosition, ie as LabelRotation, mt as LegendPosition, ne as LineStyle, Oe as MAPPING_NONE, wr as MissingNodeRenderDepsError, Et as NULL_VALUE, De as Orientation, Te as ParseOperationCategory, Cr as PngBrowserUnsupportedError, ke as RangeAnchor, pe as ScaleType, Pe as SceneTransition, t as SortDirection, He as SortMode, St as StackMode, ot as StrokeStyle, gt as SymbolShape, Ze as SymbolShowOn, Ne as SymbolStyle, ct as TRANSFORM_TYPES, lt as TickPosition, yt as TransformType, Re as ValueLabelPosition, Nt as adjustColorsForBackground, vt as applyTransformNodes, Le as applyTransformNodesToChartData, tt as applyTransformSteps, Me as astToDefinition, ae as buildChartOptions, qr as buildFrameSvg, Ft as buildSrcdoc, Be as chartDataToTable, Zt as checkCvdColors, Lt as classifyIntent, We as cleanNumericValue, it as commitFadeOut, cn as compactSerialize, sn as compactSerializeDeep, Ot as convertAnnotations, _e as convertAreaFills, u as convertColorizes, c as convertHighlights, ue as convertSeriesOverrides, Dt as createCanvas, qt as createCvdSvgFilter, ve as createFrame, w as dataEntriesToString, dt as detectColumnTypes, re as detectRangeColumn, n as extractChartTypeOptions, $e as extractSceneOverrides, Ye as fadeIn, _t as featureJoin, bt as getCachedChart, be as getChart, g as getChartOptions, f as getChartTypeDefaults, Kt as getCvdFilterId, Fe as getOutputType, ut as getSceneTransition, qe as getTransitionDuration, rt as isDateValue, Je as isNumberValue, Ue as isSeriesHidden, At as isTypeCompatible, C as listCharts, nt as listPalettes, Ut as listThemes, fe as numericColumns, b as parse, Ke as parseBpcData, S as parseData, he as parseOperationMap, o as parseOperations, y as propertyMap, E as quoteDslString, Vt as recommendCharts, Se as registerChart, Qr as render, xt as renderBpc, at as renderChart, Ge as renderHorizontalAxis, Ve as renderLegend, ft as renderVerticalAxis, Ie as resolveBackgroundColor, kt as resolveBarGapPadding, te as resolveChartTypeOptions, pt as resolveDotPlotMapping, Tt as resolvePalette, e as resolveScatterMapping, Xe as resolveScene, Ct as resolveSeriesColor, st as resolveSeriesInterpolation, xr as samples, nn as serialize, Ae as serializeTableData, zt as shapeOf, Yt as simulateCvdColor, je as snapshotForFadeOut, Qe as snapshotLiveAttrs, i as stripDigitGroupSpaces, ce as toBool, wt as transformNodesToSteps, Mt as transformValue, Wn as validateChart, jt as wcagContrastRatio, ge as wcagLevel };
1275
+ export { l as ANNOTATION_KIND_KEYWORD, de as Anchor, T as AnnotationKind, r as AnnotationLineStyle, et as ArrowDirection, se as AxisDirection, ze as BC_TRANSITION_NAME, le as ChartOptionType, Sr as ChartParseError, x as ChartType, p as CompassDirection, _ as CrosshairDirection, oe as CrosshairStyle, s as DEFAULT_BAR_GAP, me as DirectLabelMode, Pt as DotStyle, a as DslNodeType, xe as FilterCondition, ee as FrameSizing, ye as GridStyle, Ce as Interpolation, h as LabelPosition, ie as LabelRotation, mt as LegendPosition, ne as LineStyle, Oe as MAPPING_NONE, wr as MissingNodeRenderDepsError, Et as NULL_VALUE, De as Orientation, Te as ParseOperationCategory, Cr as PngBrowserUnsupportedError, ke as RangeAnchor, pe as ScaleType, Pe as SceneTransition, t as SortDirection, He as SortMode, St as StackMode, ot as StrokeStyle, gt as SymbolShape, Ze as SymbolShowOn, Ne as SymbolStyle, ct as TRANSFORM_TYPES, lt as TickPosition, yt as TransformType, Re as ValueLabelPosition, Nt as adjustColorsForBackground, vt as applyTransformNodes, Le as applyTransformNodesToChartData, tt as applyTransformSteps, Me as astToDefinition, ae as buildChartOptions, qr as buildFrameSvg, Ft as buildSrcdoc, Be as chartDataToTable, Zt as checkCvdColors, Lt as classifyIntent, We as cleanNumericValue, it as commitFadeOut, cn as compactSerialize, sn as compactSerializeDeep, Ot as convertAnnotations, _e as convertAreaFills, u as convertColorizes, c as convertHighlights, ue as convertSeriesOverrides, Dt as createCanvas, qt as createCvdSvgFilter, ve as createFrame, w as dataEntriesToString, dt as detectColumnTypes, re as detectRangeColumn, n as extractChartTypeOptions, $e as extractSceneOverrides, Ye as fadeIn, _t as featureJoin, bt as getCachedChart, be as getChart, g as getChartOptions, f as getChartTypeDefaults, Kt as getCvdFilterId, Fe as getOutputType, ut as getSceneTransition, qe as getTransitionDuration, rt as isDateValue, Je as isNumberValue, Ue as isSeriesHidden, At as isTypeCompatible, C as listCharts, Tt as listPalettes, Ut as listThemes, fe as numericColumns, b as parse, Ke as parseBpcData, S as parseData, he as parseOperationMap, o as parseOperations, y as propertyMap, E as quoteDslString, Vt as recommendCharts, Se as registerChart, Qr as render, xt as renderBpc, at as renderChart, Ge as renderHorizontalAxis, nt as renderLegend, ft as renderVerticalAxis, Ie as resolveBackgroundColor, kt as resolveBarGapPadding, te as resolveChartTypeOptions, pt as resolveDotPlotMapping, Ve as resolvePalette, e as resolveScatterMapping, Xe as resolveScene, Ct as resolveSeriesColor, st as resolveSeriesInterpolation, xr as samples, nn as serialize, Ae as serializeTableData, zt as shapeOf, Yt as simulateCvdColor, je as snapshotForFadeOut, Qe as snapshotLiveAttrs, i as stripDigitGroupSpaces, ce as toBool, wt as transformNodesToSteps, Mt as transformValue, Wn as validateChart, jt as wcagContrastRatio, ge as wcagLevel };