@blueprint-chart/lib 2.11.0 → 2.13.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/charts/format-helpers.d.ts +1 -0
- package/dist/charts/line-symbols.d.ts +2 -1
- package/dist/charts/palettes.d.ts +1 -0
- package/dist/charts/plugins/arc-labels.d.ts +1 -2
- package/dist/charts/sort-helpers.d.ts +5 -0
- package/dist/charts/themes/index.d.ts +1 -0
- package/dist/charts/types/area/area.d.ts +1 -1
- package/dist/charts/types/area-stacked/area-stacked.d.ts +0 -1
- package/dist/charts/types/bar-grouped/bar-grouped.d.ts +0 -1
- package/dist/charts/types/bar-multi/bar-multi.d.ts +0 -1
- package/dist/charts/types/bar-split/bar-split.d.ts +0 -1
- package/dist/charts/types/bar-stacked/bar-stacked.d.ts +0 -1
- package/dist/charts/types/column-stacked/column-stacked.d.ts +0 -1
- package/dist/charts/types/donut/donut.d.ts +0 -1
- package/dist/charts/types/dot-plot/dot-plot.d.ts +1 -1
- package/dist/charts/types/line/line.d.ts +1 -1
- package/dist/charts/types/line-multi/line-multi.d.ts +0 -1
- package/dist/charts/types/scatter/scatter.d.ts +1 -1
- package/dist/charts/types.d.ts +7 -0
- package/dist/embed.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +233 -243
- package/dist/lib/lib.iife.js +28 -23
- package/dist/node-backend/index.js +2554 -2592
- package/dist/render/chart-a11y.d.ts +1 -1
- package/dist/{render-bpc-dodOcvDz.js → render-bpc-Df2pX315.js} +2830 -2866
- package/dist/runtime/chart-css.d.ts +1 -1
- package/dist/runtime-CT02Shsd.js +118 -0
- package/dist/runtime.js +2 -2
- package/package.json +1 -1
- package/src/charts/chart.scss +2 -1
- package/dist/runtime-D_vHKSyR.js +0 -84
|
@@ -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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LineSymbolConfig } from './types';
|
|
1
|
+
import { ChartOptions, LineSymbolConfig } from './types';
|
|
2
2
|
import * as d3 from 'd3';
|
|
3
3
|
export declare function shouldShowSymbol(index: number, total: number, showOn: LineSymbolConfig['showOn']): boolean;
|
|
4
|
+
export declare function shouldShowValueLabel(index: number, total: number, categoryIndex: number, points: ChartOptions['valueLabelPoints'], every?: number): boolean;
|
|
4
5
|
export declare function renderLineSymbols(parent: d3.Selection<SVGGElement, unknown, null, undefined>, points: {
|
|
5
6
|
cx: number;
|
|
6
7
|
cy: number;
|
|
@@ -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
|
|
2
|
+
export declare const DEFAULT_COLOR: string;
|
|
3
3
|
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
|
|
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
|
|
2
|
+
export declare const DEFAULT_COLOR: string;
|
|
3
3
|
export declare function render(container: HTMLElement, data: ChartData, options?: ChartOptions, transition?: boolean): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartData, ChartOptions } from '../../types';
|
|
2
|
-
export declare const DEFAULT_COLOR
|
|
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/charts/types.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export interface AxisOptions {
|
|
|
50
50
|
export interface FrameOptions {
|
|
51
51
|
title?: string;
|
|
52
52
|
description?: string;
|
|
53
|
+
altText?: string;
|
|
53
54
|
byline?: string;
|
|
54
55
|
note?: string;
|
|
55
56
|
source?: string;
|
|
@@ -58,6 +59,8 @@ export interface FrameOptions {
|
|
|
58
59
|
aspectRatio?: number;
|
|
59
60
|
padding?: string;
|
|
60
61
|
transparentBackground?: boolean;
|
|
62
|
+
getTheData?: boolean;
|
|
63
|
+
data?: ChartData;
|
|
61
64
|
}
|
|
62
65
|
export interface AreaFillConfig {
|
|
63
66
|
from: string;
|
|
@@ -166,6 +169,8 @@ export interface ChartOptions {
|
|
|
166
169
|
areaLines?: boolean;
|
|
167
170
|
valueLabels?: boolean | 'percent';
|
|
168
171
|
valueLabelPosition?: ValueLabelPosition;
|
|
172
|
+
valueLabelPoints?: SymbolShowOn | 'everyN';
|
|
173
|
+
valueLabelEvery?: number;
|
|
169
174
|
tooltips?: boolean;
|
|
170
175
|
crosshair?: boolean;
|
|
171
176
|
crosshairDirection?: CrosshairDirection;
|
|
@@ -251,6 +256,8 @@ export interface ChartTypeOptions {
|
|
|
251
256
|
horizontalRangeMax: string;
|
|
252
257
|
valueLabels: boolean | 'percent';
|
|
253
258
|
valueLabelPosition: string;
|
|
259
|
+
valueLabelPoints: string;
|
|
260
|
+
valueLabelEvery: string;
|
|
254
261
|
tooltips: boolean;
|
|
255
262
|
crosshair: boolean;
|
|
256
263
|
crosshairDirection: string;
|
package/dist/embed.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, r, t as i } from "./runtime-
|
|
1
|
+
import { a as e, i as t, o as n, r, t as i } from "./runtime-CT02Shsd.js";
|
|
2
2
|
export { r as ERROR_MESSAGE, t as RESIZE_MESSAGE, i as buildSrcdoc, e as isErrorMessage, n as readResizeHeight };
|
package/dist/index.d.ts
CHANGED
|
@@ -47,5 +47,6 @@ export { ChartParseError, PngBrowserUnsupportedError, MissingNodeRenderDepsError
|
|
|
47
47
|
export { buildFrameSvg } from './render';
|
|
48
48
|
export type { FrameSvgLayout, FrameSvgTextBlock, FrameSvgPlot, ChartAccessibility } from './render';
|
|
49
49
|
export { buildSrcdoc } from './runtime/runtime';
|
|
50
|
+
export { RESIZE_MESSAGE } from './runtime/messages';
|
|
50
51
|
export { SceneTransition, getSceneTransition, featureJoin, snapshotLiveAttrs, BC_TRANSITION_NAME, } from './transitions';
|
|
51
52
|
export type { CommitOptions, TransitionMode, SceneTransitionState, FeatureRole, FeatureJoinConfig, AttrMap, AttrValue, } from './transitions';
|