@carbon/charts 1.13.34 → 1.14.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/CHANGELOG.md +13 -0
- package/dist/{_baseEach-fBb6x0bv.mjs → _baseEach-1x0l4fXu.mjs} +2 -2
- package/dist/{_baseEach-fBb6x0bv.mjs.map → _baseEach-1x0l4fXu.mjs.map} +1 -1
- package/dist/{angle-utils-uYSg57eT.mjs → angle-utils-Ss5LscUK.mjs} +2 -2
- package/dist/{angle-utils-uYSg57eT.mjs.map → angle-utils-Ss5LscUK.mjs.map} +1 -1
- package/dist/{choropleth-QJfTyxqo.mjs → choropleth-bo0SVD2j.mjs} +1843 -1818
- package/dist/choropleth-bo0SVD2j.mjs.map +1 -0
- package/dist/{color-scale-utils-k_4IkKRj.mjs → color-scale-utils-eeC25Jjh.mjs} +1263 -1078
- package/dist/color-scale-utils-eeC25Jjh.mjs.map +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/demo/charts/bar.d.ts +75 -0
- package/dist/demo/index.mjs +1394 -1294
- package/dist/demo/index.mjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -8
- package/dist/interfaces/charts.d.ts +5 -1
- package/dist/interfaces/components.d.ts +65 -0
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/model/index.mjs +1 -1
- package/dist/services/index.mjs +3 -3
- package/dist/services/time-series.d.ts +2 -1
- package/dist/umd/bundle.umd.js +25 -24
- package/dist/umd/bundle.umd.js.map +1 -1
- package/dist/{wordcloud-a6lxyv6s.mjs → wordcloud-UWOp6fZX.mjs} +381 -350
- package/dist/wordcloud-UWOp6fZX.mjs.map +1 -0
- package/dist/{zoom-PYRfEo-q.mjs → zoom-LcHlmSqj.mjs} +135 -135
- package/dist/zoom-LcHlmSqj.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/choropleth-QJfTyxqo.mjs.map +0 -1
- package/dist/color-scale-utils-k_4IkKRj.mjs.map +0 -1
- package/dist/wordcloud-a6lxyv6s.mjs.map +0 -1
- package/dist/zoom-PYRfEo-q.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { interfaces_1 as interfaces };
|
|
|
5
5
|
export { AxisChart } from './axis-chart';
|
|
6
6
|
export { Chart } from './chart';
|
|
7
7
|
export { AlluvialChart, AreaChart, BoxplotChart, BubbleChart, BulletChart, Charts, ExperimentalChoroplethChart, CirclePackChart, ComboChart, DonutChart, GaugeChart, GroupedBarChart, HeatmapChart, HistogramChart, LineChart, LollipopChart, MeterChart, PieChart, RadarChart, ScatterChart, SimpleBarChart, StackedAreaChart, StackedBarChart, TreeChart, TreemapChart, WordCloudChart } from './charts';
|
|
8
|
-
export { ChartConfig, ChartData, ChartOptions, ChartTabularData, DataSet, LayoutConfigs, AlluvialChartOptions, AreaChartOptions, AxisChartOptions, BarChartOptions, BaseChartOptions, BinnedAxisChartOptions, BoxplotChartOptions, BubbleChartOptions, BulletChartOptions, ChoroplethChartOptions, CirclePackChartOptions, ComboChartOptions, DonutChartOptions, GaugeChartOptions, HeatmapChartOptions, HistogramChartOptions, LineChartOptions, LollipopChartOptions, MeterChartOptions, PieChartOptions, ProportionalMeterChartOptions, RadarChartOptions, ScatterChartOptions, StackedAreaChartOptions, StackedBarChartOptions, ThematicChartOptions, TreeChartOptions, TreemapChartOptions, WorldCloudChartOptions, AxesOptions, AxisOptions, BarOptions, BasedAxisOptions, BinnedAxisOptions, ComboChartAxisOptions, GridOptions, LegendOptions, RulerOptions, StackedBarOptions, TimeScaleOptions, ThresholdOptions, ToolbarOptions, TooltipOptions, TruncationOptions, WordCloudChartTooltipOptions, ZoomBarOptions, ZoomBarsOptions, TabularRepCustomizationOptions, TickFormats, TimeIntervalFormats, TimeIntervalNames, Coordinates, LegendItem, LayoutComponentChild, Services, ToolbarControl } from './interfaces';
|
|
8
|
+
export { ChartConfig, ChartData, ChartOptions, ChartTabularData, DataSet, LayoutConfigs, AlluvialChartOptions, AreaChartOptions, AxisChartOptions, BarChartOptions, BaseChartOptions, BinnedAxisChartOptions, BoxplotChartOptions, BubbleChartOptions, BulletChartOptions, ChoroplethChartOptions, CirclePackChartOptions, ComboChartOptions, DonutChartOptions, GaugeChartOptions, HeatmapChartOptions, HistogramChartOptions, LineChartOptions, LollipopChartOptions, MeterChartOptions, PieChartOptions, ProportionalMeterChartOptions, RadarChartOptions, ScatterChartOptions, StackedAreaChartOptions, StackedBarChartOptions, ThematicChartOptions, TreeChartOptions, TreemapChartOptions, WorldCloudChartOptions, AxesOptions, AxisOptions, BarOptions, BasedAxisOptions, BinnedAxisOptions, ComboChartAxisOptions, GridOptions, LegendOptions, Locale, LocaleTimeScaleOptions, RulerOptions, StackedBarOptions, TimeScaleOptions, ThresholdOptions, ToolbarOptions, TooltipOptions, TruncationOptions, WordCloudChartTooltipOptions, ZoomBarOptions, ZoomBarsOptions, TabularRepCustomizationOptions, TickFormats, TimeIntervalFormats, TimeIntervalNames, Coordinates, LegendItem, LayoutComponentChild, Services, ToolbarControl } from './interfaces';
|
|
9
9
|
export { Alignments, AreaEvent, ArrowDirections, AxisEvent, AxisFlavor, AxisPositions, AxisTitleOrientations, BarEvent, BoxplotEvent, CalloutDirections, CanvasZoomEvent, CartesianOrientations, ChartEvent, ChartTheme, ChartTypes, ColorClassNameTypes, ColorLegendType, DividerStatus, DominantBaseline, GaugeEvent, GaugeTypes, LayoutAlignItems, LayoutDirection, LayoutGrowth, LegendItemType, LegendOrientations, LegendPositions, LineEvent, ModalEvent, ModelEvent, PieEvent, Projection, RadarEvent, RenderTypes, ScaleTypes, ScatterEvent, Skeletons, Statuses, TextAnchor, ThresholdEvent, TickRotations, ToolbarControlTypes, TooltipEvent, TruncationTypes, TreeEvent, TreemapEvent, TreeTypes, WordCloudEvent, ZoombarEvent, ZoomDomainEvent, ZoomBarTypes } from './interfaces';
|
|
10
10
|
export { alluvial, area, axis, baseTooltip, boxplot, canvasZoomSettings, carbonPrefix, circlePack, color, defaultLegendAdditionalItems, grid, histogram, legend, lines, meter, options, pie, radar, ruler, spacers, timeScale, tooltips, transitions, toolbar, zoomBar } from './configuration';
|
|
11
11
|
export { Axis, BinnedRuler, ChartClip, ChartBrush, GenericSvgSelection, Grid, HoverAxis, Ruler, StackedRuler, Toolbar, TwoDimensionalAxes, ZeroLine, ZoomBar, arrowLeft, arrowRight, buildBezierPathString, buildElbowPathString, buildStraightPathString, circle, diamond, square, tee, AxisChartsTooltip, CanvasChartClip, ColorScaleLegend, GeoProjection, Highlight, Legend, MeterTitle, Modal, Threshold, Title, Tooltip, Alluvial, Area, Bar, Boxplot, Bubble, Bullet, Choropleth, CirclePack, Donut, Gauge, GroupedBar, Heatmap, Histogram, Line, Lollipop, Meter, Pie, Radar, Scatter, SimpleBar, Skeleton, SkeletonLines, StackedArea, StackedBar, StackedScatter, Tree, Treemap, WordCloud, LayoutComponent, Spacer, Component } from './components';
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as Lt,
|
|
1
|
+
import { L as Y, m as l, M as a, N as r, t as J, x as V } from "./color-scale-utils-eeC25Jjh.mjs";
|
|
2
|
+
import { T as Lt, P as Ft, Q as Pt, J as Mt, R as kt, S as Bt, C as It, n as Ht, U as Gt, y as Vt, c as Ut, O as Nt, V as Zt, f as _t, b as zt, g as Wt, a as $t, d as jt, W as Kt, u as Jt, i as Xt, s as qt, X as Qt, Y as Yt, Z as eo, _ as so, $ as to, a0 as oo, a1 as no, a3 as io, a2 as ro, D as ao, K as ho } from "./color-scale-utils-eeC25Jjh.mjs";
|
|
3
3
|
import { i as mo } from "./index-2XiCVv0D.mjs";
|
|
4
|
-
import { C as Re, c as Te, A as be, B as Oe, a as fe, d as Se, e as Ae, P as xe, G as ye, H as De, b as Le, M as Fe, R as Pe, T as Me, f as ke, W as Be } from "./wordcloud-
|
|
4
|
+
import { C as Re, c as Te, A as be, B as Oe, a as fe, d as Se, e as Ae, P as xe, G as ye, H as De, b as Le, M as Fe, R as Pe, T as Me, f as ke, W as Be } from "./wordcloud-UWOp6fZX.mjs";
|
|
5
5
|
import { _ as $, r as i, q as c, L as Z, y as A, t as U, e as j, S as Ie, u as K, F as p, l as R } from "./enums-lWSDG4ik.mjs";
|
|
6
6
|
import { A as po, a as Co, b as uo, c as vo, d as go, f as wo, B as Eo, g as Ro, C as To, h as bo, i as Oo, j as fo, k as So, m as Ao, n as xo, D as yo, o as Do, G as Lo, p as Fo, s as Po, v as Mo, M as ko, w as Bo, P as Io, x as Ho, R as Go, z as Vo, H as Uo, T as No, I as Zo, J as _o, K as zo, N as Wo, O as $o, Q as jo, U as Ko, V as Jo, W as Xo, Z as qo, X as Qo, Y as Yo } from "./enums-lWSDG4ik.mjs";
|
|
7
|
-
import { a9 as He, L as ee, l as Ge, r as _, T as z, a6 as g, a7 as L, u as se, p as W, C as Ve, a as Ue, q as Ne, o as Ze, c as _e, k as te, v as ze, b as d, G as w, R as B, P as k, w as oe, X as M, _ as C, y as We, Z as I, z as $e, D as je, m as ne, E as Ke, F as Je, a0 as ie, a2 as re, S as N, Y as ae, K as he, a1 as ce, V as Xe, I as qe, J as Qe, N as Ye, B as es, O as ss, $ as ts, Q as os, M as ns, U as is, W as rs, a3 as as, a4 as hs, a5 as cs } from "./choropleth-
|
|
8
|
-
import { A as sn, x as tn, a8 as on, n as nn, H as rn, d as an, e as hn, f as cn, g as mn, h as ln, i as pn, j as dn, s as Cn, t as un } from "./choropleth-
|
|
9
|
-
import { C as ms, E as ls, F as ps, T as ds, b as Cs, a as us, Z as vs, f as gs } from "./zoom-
|
|
10
|
-
import { D as ws, G as Es } from "./angle-utils-
|
|
11
|
-
import { S as gn, d as wn, a as En, p as Rn, b as Tn, r as bn } from "./angle-utils-
|
|
7
|
+
import { a9 as He, L as ee, l as Ge, r as _, T as z, a6 as g, a7 as L, u as se, p as W, C as Ve, a as Ue, q as Ne, o as Ze, c as _e, k as te, v as ze, b as d, G as w, R as B, P as k, w as oe, X as M, _ as C, y as We, Z as I, z as $e, D as je, m as ne, E as Ke, F as Je, a0 as ie, a2 as re, S as N, Y as ae, K as he, a1 as ce, V as Xe, I as qe, J as Qe, N as Ye, B as es, O as ss, $ as ts, Q as os, M as ns, U as is, W as rs, a3 as as, a4 as hs, a5 as cs } from "./choropleth-bo0SVD2j.mjs";
|
|
8
|
+
import { A as sn, x as tn, a8 as on, n as nn, H as rn, d as an, e as hn, f as cn, g as mn, h as ln, i as pn, j as dn, s as Cn, t as un } from "./choropleth-bo0SVD2j.mjs";
|
|
9
|
+
import { C as ms, E as ls, F as ps, T as ds, b as Cs, a as us, Z as vs, f as gs } from "./zoom-LcHlmSqj.mjs";
|
|
10
|
+
import { D as ws, G as Es } from "./angle-utils-Ss5LscUK.mjs";
|
|
11
|
+
import { S as gn, d as wn, a as En, p as Rn, b as Tn, r as bn } from "./angle-utils-Ss5LscUK.mjs";
|
|
12
12
|
function Rs(o, e, s) {
|
|
13
13
|
var n = -1, t = o.length;
|
|
14
14
|
e < 0 && (e = -e > t ? 0 : t + e), s = s > t ? t : s, s < 0 && (s += t), t = e > s ? 0 : s - e >>> 0, e >>>= 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alignments, ArrowDirections, ChartTheme, ChartTypes, ColorLegendType, DividerStatus, GaugeTypes, Projection, Statuses, TreeTypes } from './enums';
|
|
2
|
-
import { BarOptions, GridOptions, LegendOptions, StackedBarOptions, ToolbarOptions, TooltipOptions, ZoomBarsOptions, TabularRepCustomizationOptions } from './components';
|
|
2
|
+
import { BarOptions, GridOptions, LegendOptions, StackedBarOptions, ToolbarOptions, TooltipOptions, ZoomBarsOptions, Locale, TabularRepCustomizationOptions } from './components';
|
|
3
3
|
import { AxesOptions, AxisOptions, BinnedAxisOptions, ComboChartAxisOptions, TimeScaleOptions } from './axis-scales';
|
|
4
4
|
/**
|
|
5
5
|
* Base chart options common to any chart
|
|
@@ -9,6 +9,10 @@ export interface BaseChartOptions {
|
|
|
9
9
|
* Optionally specify a title for the chart
|
|
10
10
|
*/
|
|
11
11
|
title?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Locale configuration
|
|
14
|
+
*/
|
|
15
|
+
locale?: Locale;
|
|
12
16
|
/**
|
|
13
17
|
* boolean to disable animations (enabled by default)
|
|
14
18
|
*/
|
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
import { LayoutGrowth, LegendPositions, Alignments, ToolbarControlTypes, ZoomBarTypes } from './enums';
|
|
2
2
|
import { Component } from '../components';
|
|
3
3
|
import { TruncationOptions } from './truncation';
|
|
4
|
+
/**
|
|
5
|
+
*Locale Options Interface
|
|
6
|
+
*/
|
|
7
|
+
export interface Locale {
|
|
8
|
+
code?: string;
|
|
9
|
+
number?: (value: number, language: string) => string;
|
|
10
|
+
date?: (value: Date, language: string, options: Intl.DateTimeFormatOptions, preformattedLocaleValue?: string) => string;
|
|
11
|
+
time?: (value: Date, language: string, options: Intl.DateTimeFormatOptions, preformattedLocaleValue?: string) => string;
|
|
12
|
+
optionsObject?: {
|
|
13
|
+
'15seconds'?: LocaleTimeScaleOptions;
|
|
14
|
+
minute?: LocaleTimeScaleOptions;
|
|
15
|
+
'30minutes'?: LocaleTimeScaleOptions;
|
|
16
|
+
hourly?: LocaleTimeScaleOptions;
|
|
17
|
+
daily?: LocaleTimeScaleOptions;
|
|
18
|
+
weekly?: LocaleTimeScaleOptions;
|
|
19
|
+
monthly?: LocaleTimeScaleOptions;
|
|
20
|
+
quarterly?: LocaleTimeScaleOptions;
|
|
21
|
+
yearly?: LocaleTimeScaleOptions;
|
|
22
|
+
};
|
|
23
|
+
translations?: {
|
|
24
|
+
group?: string;
|
|
25
|
+
total?: string;
|
|
26
|
+
meter?: {
|
|
27
|
+
title?: string;
|
|
28
|
+
};
|
|
29
|
+
tabularRep: {
|
|
30
|
+
title?: string;
|
|
31
|
+
downloadAsCSV?: string;
|
|
32
|
+
};
|
|
33
|
+
toolbar: {
|
|
34
|
+
exportAsCSV?: string;
|
|
35
|
+
exportAsJPG?: string;
|
|
36
|
+
exportAsPNG?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface LocaleTimeScaleOptions {
|
|
41
|
+
primary?: Record<string, {
|
|
42
|
+
month?: string;
|
|
43
|
+
day?: string;
|
|
44
|
+
hour?: string;
|
|
45
|
+
minute?: string;
|
|
46
|
+
second?: string;
|
|
47
|
+
fractionalSecondDigits?: number;
|
|
48
|
+
weekday?: string;
|
|
49
|
+
year?: string;
|
|
50
|
+
hourCycle?: string;
|
|
51
|
+
hour12?: boolean;
|
|
52
|
+
dayPeriod?: string;
|
|
53
|
+
}>;
|
|
54
|
+
secondary?: Record<string, {
|
|
55
|
+
month?: string;
|
|
56
|
+
day?: string;
|
|
57
|
+
hour?: string;
|
|
58
|
+
minute?: string;
|
|
59
|
+
second?: string;
|
|
60
|
+
fractionalSecondDigits?: number;
|
|
61
|
+
weekday?: string;
|
|
62
|
+
year?: string;
|
|
63
|
+
hourCycle?: string;
|
|
64
|
+
hour12?: boolean;
|
|
65
|
+
dayPeriod?: string;
|
|
66
|
+
}>;
|
|
67
|
+
type?: string;
|
|
68
|
+
}
|
|
4
69
|
/**
|
|
5
70
|
* customize the overlay contents
|
|
6
71
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Roles } from './a11y';
|
|
2
2
|
export { AxesOptions, AxisOptions, BasedAxisOptions, BinnedAxisOptions, ComboChartAxisOptions, TickFormats, TimeIntervalFormats, TimeIntervalNames, TimeScaleOptions } from './axis-scales';
|
|
3
3
|
export { AlluvialChartOptions, AreaChartOptions, AxisChartOptions, BarChartOptions, BaseChartOptions, BinnedAxisChartOptions, BoxplotChartOptions, BubbleChartOptions, BulletChartOptions, ChartOptions, ChoroplethChartOptions, CirclePackChartOptions, ComboChartOptions, DonutChartOptions, GaugeChartOptions, HeatmapChartOptions, HistogramChartOptions, LineChartOptions, LollipopChartOptions, MeterChartOptions, PieChartOptions, ProportionalMeterChartOptions, RadarChartOptions, ScatterChartOptions, StackedAreaChartOptions, StackedBarChartOptions, ThematicChartOptions, TreemapChartOptions, TreeChartOptions, WorldCloudChartOptions, WordCloudChartTooltipOptions } from './charts';
|
|
4
|
-
export { BarOptions, GridOptions, LayoutComponentChild, LegendItem, LegendOptions, RulerOptions, StackedBarOptions, ThresholdOptions, TooltipOptions, ToolbarControl, ToolbarOptions, ZoomBarOptions, ZoomBarsOptions, TabularRepCustomizationOptions } from './components';
|
|
4
|
+
export { BarOptions, GridOptions, LayoutComponentChild, LegendItem, LegendOptions, Locale, LocaleTimeScaleOptions, RulerOptions, StackedBarOptions, ThresholdOptions, TooltipOptions, ToolbarControl, ToolbarOptions, ZoomBarOptions, ZoomBarsOptions, TabularRepCustomizationOptions } from './components';
|
|
5
5
|
export { Coordinates, LayoutConfigs } from './layout';
|
|
6
6
|
export { ChartConfig, ChartData, ChartTabularData, DataSet } from './model';
|
|
7
7
|
export { Services } from './services';
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as l, B as o, a as r, C as d, b as t, c as C, d as M, e as s, G as h, H as i, M as p, P as u, R as B, T as c, f as m, W as n } from "../wordcloud-
|
|
1
|
+
import { A as l, B as o, a as r, C as d, b as t, c as C, d as M, e as s, G as h, H as i, M as p, P as u, R as B, T as c, f as m, W as n } from "../wordcloud-UWOp6fZX.mjs";
|
|
2
2
|
export {
|
|
3
3
|
l as AlluvialChartModel,
|
|
4
4
|
o as BoxplotChartModel,
|
package/dist/services/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as e, c as r, f as i, b as o, g as t, a as l, d as m, i as n } from "../color-scale-utils-
|
|
2
|
-
import { D as c, G as d, S as C, d as f, a as g, p, b as D, r as S } from "../angle-utils-
|
|
3
|
-
import { C as b, b as E, a as x, E as I, F as M, T as P, Z } from "../zoom-
|
|
1
|
+
import { T as e, c as r, f as i, b as o, g as t, a as l, d as m, i as n } from "../color-scale-utils-eeC25Jjh.mjs";
|
|
2
|
+
import { D as c, G as d, S as C, d as f, a as g, p, b as D, r as S } from "../angle-utils-Ss5LscUK.mjs";
|
|
3
|
+
import { C as b, b as E, a as x, E as I, F as M, T as P, Z } from "../zoom-LcHlmSqj.mjs";
|
|
4
4
|
export {
|
|
5
5
|
b as CanvasZoom,
|
|
6
6
|
E as CartesianScales,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Locale } from '../interfaces/components';
|
|
1
2
|
import { TimeIntervalFormats, TimeScaleOptions } from '../interfaces/axis-scales';
|
|
2
3
|
export declare const TIME_INTERVALS: (string | number)[][];
|
|
3
4
|
export declare function isTickPrimary(tick: number, i: number, allTicks: Array<number>, interval: string, showDayName: boolean): boolean;
|
|
4
|
-
export declare function formatTick(tick: number, i: number, allTicks: Array<number>, interval: string, timeScaleOptions: TimeScaleOptions): string;
|
|
5
|
+
export declare function formatTick(tick: number, i: number, allTicks: Array<number>, interval: string, timeScaleOptions: TimeScaleOptions, localeOptions?: Locale): string;
|
|
5
6
|
export declare function getTimeformats(timestamp: number): {
|
|
6
7
|
M: number;
|
|
7
8
|
d: number;
|