@carbon/charts 1.11.2 → 1.11.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/CHANGELOG.md +26 -0
- package/dist/{_baseEach-477c04db.js → _baseEach-326db134.js} +2 -2
- package/dist/{_baseEach-477c04db.js.map → _baseEach-326db134.js.map} +1 -1
- package/dist/{_baseEach-05847c57.mjs → _baseEach-9b6a12fa.mjs} +2 -2
- package/dist/{_baseEach-05847c57.mjs.map → _baseEach-9b6a12fa.mjs.map} +1 -1
- package/dist/angle-utils-264ed176.mjs +840 -0
- package/dist/angle-utils-264ed176.mjs.map +1 -0
- package/dist/angle-utils-ccc0d890.js +3 -0
- package/dist/angle-utils-ccc0d890.js.map +1 -0
- package/dist/chart.d.ts +1 -1
- package/dist/{choropleth-9a359c3b.mjs → choropleth-141685a0.mjs} +280 -277
- package/dist/choropleth-141685a0.mjs.map +1 -0
- package/dist/{choropleth-2f8ec4a1.js → choropleth-b1a3729f.js} +9 -9
- package/dist/choropleth-b1a3729f.js.map +1 -0
- package/dist/color-scale-utils-2cd523be.js +2 -0
- package/dist/color-scale-utils-2cd523be.js.map +1 -0
- package/dist/color-scale-utils-b9604b2c.mjs +3335 -0
- package/dist/color-scale-utils-b9604b2c.mjs.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/demo/charts/index.d.ts +9 -6
- package/dist/demo/index.js +197 -193
- package/dist/demo/index.js.map +1 -1
- package/dist/demo/index.mjs +2119 -1592
- package/dist/demo/index.mjs.map +1 -1
- package/dist/demo/utils/index.d.ts +1 -1
- package/dist/demo/utils/package-versions.d.ts +20 -0
- package/dist/demo/utils/stackblitz/angular.d.ts +3 -0
- package/dist/demo/utils/stackblitz/index.d.ts +5 -0
- package/dist/demo/utils/stackblitz/react.d.ts +3 -0
- package/dist/demo/utils/stackblitz/svelte.d.ts +3 -0
- package/dist/demo/utils/stackblitz/vanilla-js.d.ts +3 -0
- package/dist/demo/utils/stackblitz/vue.d.ts +3 -0
- package/dist/{index-e425a7b5.mjs → index-4b5d1e49.mjs} +3 -3
- package/dist/{index-e425a7b5.mjs.map → index-4b5d1e49.mjs.map} +1 -1
- package/dist/{index-4203ca23.js → index-eace9da9.js} +2 -2
- package/dist/{index-4203ca23.js.map → index-eace9da9.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +126 -125
- package/dist/index.mjs.map +1 -1
- package/dist/model/index.js +1 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/index.mjs +34 -34
- package/dist/model/index.mjs.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.mjs +10 -10
- package/package.json +5 -5
- package/dist/angle-utils-512bc5cd.js +0 -2
- package/dist/angle-utils-512bc5cd.js.map +0 -1
- package/dist/angle-utils-7255d1d9.mjs +0 -387
- package/dist/angle-utils-7255d1d9.mjs.map +0 -1
- package/dist/choropleth-2f8ec4a1.js.map +0 -1
- package/dist/choropleth-9a359c3b.mjs.map +0 -1
- package/dist/color-scale-utils-222feda6.mjs +0 -3815
- package/dist/color-scale-utils-222feda6.mjs.map +0 -1
- package/dist/color-scale-utils-79786095.js +0 -3
- package/dist/color-scale-utils-79786095.js.map +0 -1
- package/dist/demo/utils/sandbox.d.ts +0 -36
package/dist/index.mjs
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { t as Y, g as
|
|
2
|
-
import { T as It,
|
|
1
|
+
import { t as Y, g as l, m as a, o as r, e as J, f as V } from "./color-scale-utils-b9604b2c.mjs";
|
|
2
|
+
import { T as It, j as Ht, l as Gt, n as Vt, p as Nt, q as Ut, s as Zt, d as _t, u as zt, v as Wt, L as jt, h as $t, w as Kt, M as Jt, N as qt, O as Xt, P as Qt, Q as Yt, x as eo, y as so, R as to, z as oo, A as no, B as io, C as ro, D as ao, E as ho, F as co, G as mo, J as lo, H as po, I as Co, K as uo } from "./color-scale-utils-b9604b2c.mjs";
|
|
3
3
|
import { i as go } from "./index-ec554115.mjs";
|
|
4
|
-
import { ChartModel as Re, ChartModelCartesian as Te, AlluvialChartModel as be, BoxplotChartModel as Oe, BulletChartModel as
|
|
4
|
+
import { ChartModel as Re, ChartModelCartesian as Te, AlluvialChartModel as be, BoxplotChartModel as Oe, BulletChartModel as fe, ChoroplethModel as Se, CirclePackChartModel as Ae, PieChartModel as xe, GaugeChartModel as ye, HeatmapModel as De, ChartModelBinned as Fe, MeterChartModel as Le, RadarChartModel as Pe, TreeChartModel as Me, TreemapChartModel as ke, WordCloudModel as Be } from "./model/index.mjs";
|
|
5
5
|
import { _ as j, r as i, q as c, L as Z, y as A, t as N, e as $, S as Ie, u as K, F as p, l as R } from "./enums-a96ef472.mjs";
|
|
6
|
-
import { A as Eo, a as Ro, b as To, c as bo, d as Oo, f as
|
|
7
|
-
import { c as He, L as ee, C as Ge, T as _, a as z, b as g, S as F, d as se, M as W, e as Ve, f as Ne, g as Ue, H as Ze, Z as _e, A as te, h as ze, i as d, G as w, R as B, j as k, k as oe, l as M, m as C, B as We, n as I, o as je, p as $e, q as ne, r as Ke, s as Je, t as ie, u as re, v as U, w as ae, x as he, y as ce, P as qe, D as Xe, z as Qe, E as Ye, F as es, I as ss, J as ts, K as os, N as ns, O as is, Q as rs, U as as, V as hs, W as cs } from "./choropleth-
|
|
8
|
-
import { X as hn, a8 as cn, a9 as mn, a7 as ln, Y as pn, _ as dn, $ as Cn, a0 as un, a1 as vn, a2 as gn, a3 as wn, a4 as En, a5 as Rn, a6 as Tn } from "./choropleth-
|
|
9
|
-
import { C as ms, E as ls, F as ps, T as ds, a as Cs, b as us, Z as vs, f as gs } from "./index-
|
|
10
|
-
import { D as ws, G as Es } from "./angle-utils-
|
|
11
|
-
import { S as On, d as
|
|
6
|
+
import { A as Eo, a as Ro, b as To, c as bo, d as Oo, f as fo, B as So, g as Ao, C as xo, h as yo, i as Do, j as Fo, k as Lo, m as Po, n as Mo, D as ko, o as Bo, G as Io, p as Ho, s as Go, v as Vo, M as No, w as Uo, P as Zo, x as _o, R as zo, z as Wo, H as jo, T as $o, I as Ko, J as Jo, K as qo, N as Xo, O as Qo, Q as Yo, U as en, V as sn, W as tn, Z as on, X as nn, Y as rn } from "./enums-a96ef472.mjs";
|
|
7
|
+
import { c as He, L as ee, C as Ge, T as _, a as z, b as g, S as F, d as se, M as W, e as Ve, f as Ne, g as Ue, H as Ze, Z as _e, A as te, h as ze, i as d, G as w, R as B, j as k, k as oe, l as M, m as C, B as We, n as I, o as je, p as $e, q as ne, r as Ke, s as Je, t as ie, u as re, v as U, w as ae, x as he, y as ce, P as qe, D as Xe, z as Qe, E as Ye, F as es, I as ss, J as ts, K as os, N as ns, O as is, Q as rs, U as as, V as hs, W as cs } from "./choropleth-141685a0.mjs";
|
|
8
|
+
import { X as hn, a8 as cn, a9 as mn, a7 as ln, Y as pn, _ as dn, $ as Cn, a0 as un, a1 as vn, a2 as gn, a3 as wn, a4 as En, a5 as Rn, a6 as Tn } from "./choropleth-141685a0.mjs";
|
|
9
|
+
import { C as ms, E as ls, F as ps, T as ds, a as Cs, b as us, Z as vs, f as gs } from "./index-4b5d1e49.mjs";
|
|
10
|
+
import { D as ws, G as Es } from "./angle-utils-264ed176.mjs";
|
|
11
|
+
import { S as On, d as fn, a as Sn, p as An, b as xn, r as yn } from "./angle-utils-264ed176.mjs";
|
|
12
12
|
import "d3";
|
|
13
13
|
import "./index-becfb567.mjs";
|
|
14
14
|
import "./a11y-7bad4f48.mjs";
|
|
15
|
-
import "./_baseEach-
|
|
15
|
+
import "./_baseEach-9b6a12fa.mjs";
|
|
16
16
|
import "d3-sankey";
|
|
17
17
|
import "d3-cloud";
|
|
18
|
-
function Rs(
|
|
19
|
-
var
|
|
20
|
-
e < 0 && (e = -e >
|
|
21
|
-
for (var h = Array(
|
|
22
|
-
h[
|
|
18
|
+
function Rs(o, e, s) {
|
|
19
|
+
var n = -1, t = o.length;
|
|
20
|
+
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;
|
|
21
|
+
for (var h = Array(t); ++n < t; )
|
|
22
|
+
h[n] = o[n + e];
|
|
23
23
|
return h;
|
|
24
24
|
}
|
|
25
|
-
function Ts(
|
|
26
|
-
var
|
|
27
|
-
return s = s === void 0 ?
|
|
25
|
+
function Ts(o, e, s) {
|
|
26
|
+
var n = o.length;
|
|
27
|
+
return s = s === void 0 ? n : s, !e && s >= n ? o : Rs(o, e, s);
|
|
28
28
|
}
|
|
29
|
-
var bs = "\\ud800-\\udfff", Os = "\\u0300-\\u036f",
|
|
30
|
-
function me(
|
|
31
|
-
return Ds.test(
|
|
29
|
+
var bs = "\\ud800-\\udfff", Os = "\\u0300-\\u036f", fs = "\\ufe20-\\ufe2f", Ss = "\\u20d0-\\u20ff", As = Os + fs + Ss, xs = "\\ufe0e\\ufe0f", ys = "\\u200d", Ds = RegExp("[" + ys + bs + As + xs + "]");
|
|
30
|
+
function me(o) {
|
|
31
|
+
return Ds.test(o);
|
|
32
32
|
}
|
|
33
|
-
function Fs(
|
|
34
|
-
return
|
|
33
|
+
function Fs(o) {
|
|
34
|
+
return o.split("");
|
|
35
35
|
}
|
|
36
36
|
var le = "\\ud800-\\udfff", Ls = "\\u0300-\\u036f", Ps = "\\ufe20-\\ufe2f", Ms = "\\u20d0-\\u20ff", ks = Ls + Ps + Ms, Bs = "\\ufe0e\\ufe0f", Is = "[" + le + "]", q = "[" + ks + "]", X = "\\ud83c[\\udffb-\\udfff]", Hs = "(?:" + q + "|" + X + ")", pe = "[^" + le + "]", de = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ce = "[\\ud800-\\udbff][\\udc00-\\udfff]", Gs = "\\u200d", ue = Hs + "?", ve = "[" + Bs + "]?", Vs = "(?:" + Gs + "(?:" + [pe, de, Ce].join("|") + ")" + ve + ue + ")*", Ns = ve + ue + Vs, Us = "(?:" + [pe + q + "?", q, de, Ce, Is].join("|") + ")", Zs = RegExp(X + "(?=" + X + ")|" + Us + Ns, "g");
|
|
37
|
-
function _s(
|
|
38
|
-
return
|
|
37
|
+
function _s(o) {
|
|
38
|
+
return o.match(Zs) || [];
|
|
39
39
|
}
|
|
40
|
-
function zs(
|
|
41
|
-
return me(
|
|
40
|
+
function zs(o) {
|
|
41
|
+
return me(o) ? _s(o) : Fs(o);
|
|
42
42
|
}
|
|
43
|
-
function Ws(
|
|
43
|
+
function Ws(o) {
|
|
44
44
|
return function(e) {
|
|
45
45
|
e = Y(e);
|
|
46
|
-
var s = me(e) ? zs(e) : void 0,
|
|
47
|
-
return o
|
|
46
|
+
var s = me(e) ? zs(e) : void 0, n = s ? s[0] : e.charAt(0), t = s ? Ts(s, 1).join("") : e.slice(1);
|
|
47
|
+
return n[o]() + t;
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
var js = Ws("toUpperCase");
|
|
51
51
|
const $s = js;
|
|
52
|
-
function Ks(
|
|
53
|
-
return $s(Y(
|
|
52
|
+
function Ks(o) {
|
|
53
|
+
return $s(Y(o).toLowerCase());
|
|
54
54
|
}
|
|
55
|
-
var Js = He(function(
|
|
56
|
-
return e = e.toLowerCase(),
|
|
55
|
+
var Js = He(function(o, e, s) {
|
|
56
|
+
return e = e.toLowerCase(), o + (s ? Ks(e) : e);
|
|
57
57
|
});
|
|
58
58
|
const qs = Js;
|
|
59
59
|
class T {
|
|
@@ -72,26 +72,27 @@ class T {
|
|
|
72
72
|
}
|
|
73
73
|
// Contains the code that uses properties that are overridable by the super-class
|
|
74
74
|
init(e, s) {
|
|
75
|
-
this.model.set({ holder: e }, { skipUpdate: !0 }), Object.keys(this.services).forEach((
|
|
76
|
-
const
|
|
77
|
-
this.services[
|
|
78
|
-
}), this.services.events.addEventListener(j.Model.UPDATE, () => {
|
|
79
|
-
|
|
75
|
+
this.model.set({ holder: e }, { skipUpdate: !0 }), Object.keys(this.services).forEach((n) => {
|
|
76
|
+
const t = this.services[n];
|
|
77
|
+
this.services[n] = new t(this.model, this.services);
|
|
78
|
+
}), this.services.events.addEventListener(j.Model.UPDATE, (n) => {
|
|
79
|
+
const t = !!l(n, "detail", "animate");
|
|
80
|
+
this.update(t);
|
|
80
81
|
}), this.model.setData(s.data), this.services.events.addEventListener(j.Chart.RESIZE, () => {
|
|
81
|
-
this.update();
|
|
82
|
+
this.update(!1);
|
|
82
83
|
}), this.components = this.getComponents(), this.update();
|
|
83
84
|
}
|
|
84
85
|
getComponents() {
|
|
85
86
|
return console.error("getComponents() method is not implemented"), [];
|
|
86
87
|
}
|
|
87
|
-
update() {
|
|
88
|
+
update(e = !0) {
|
|
88
89
|
if (!this.components)
|
|
89
90
|
return;
|
|
90
|
-
Object.keys(this.services).forEach((
|
|
91
|
-
this.services[
|
|
92
|
-
}), this.components.forEach((
|
|
93
|
-
const
|
|
94
|
-
Promise.all(
|
|
91
|
+
Object.keys(this.services).forEach((t) => {
|
|
92
|
+
this.services[t].update();
|
|
93
|
+
}), this.components.forEach((t) => t.render(e));
|
|
94
|
+
const s = this.services.transitions.getPendingTransitions(), n = Object.keys(s).map((t) => s[t].end().catch((m) => m));
|
|
95
|
+
Promise.all(n).then(
|
|
95
96
|
() => this.services.events.dispatchEvent(j.Chart.RENDER_FINISHED)
|
|
96
97
|
);
|
|
97
98
|
}
|
|
@@ -99,12 +100,12 @@ class T {
|
|
|
99
100
|
this.components.forEach((e) => e.destroy()), this.services.domUtils.getHolder().remove(), this.model.set({ destroyed: !0 }, { skipUpdate: !0 });
|
|
100
101
|
}
|
|
101
102
|
getChartComponents(e, s) {
|
|
102
|
-
const
|
|
103
|
+
const n = this.model.getOptions(), t = l(n, "toolbar", "enabled"), h = {
|
|
103
104
|
id: "legend",
|
|
104
105
|
components: [new ee(this.model, this.services)],
|
|
105
106
|
growth: i.PREFERRED
|
|
106
|
-
},
|
|
107
|
-
|
|
107
|
+
}, m = l(n, "canvasZoom", "enabled");
|
|
108
|
+
m && m === !0 && e.push(new Ge(this.model, this.services));
|
|
108
109
|
const b = !!this.model.getOptions().title, O = {
|
|
109
110
|
id: "title",
|
|
110
111
|
components: [new _(this.model, this.services)],
|
|
@@ -122,7 +123,7 @@ class T {
|
|
|
122
123
|
[
|
|
123
124
|
// always add title to keep layout correct
|
|
124
125
|
O,
|
|
125
|
-
...
|
|
126
|
+
...t ? [x] : []
|
|
126
127
|
],
|
|
127
128
|
{
|
|
128
129
|
direction: c.ROW,
|
|
@@ -135,12 +136,12 @@ class T {
|
|
|
135
136
|
id: "graph-frame",
|
|
136
137
|
components: e,
|
|
137
138
|
growth: i.STRETCH,
|
|
138
|
-
renderType:
|
|
139
|
-
}, D =
|
|
140
|
-
let
|
|
139
|
+
renderType: l(s, "graphFrameRenderType") || A.SVG
|
|
140
|
+
}, D = l(s, "excludeLegend") !== !0 && n.legend.enabled !== !1;
|
|
141
|
+
let f = c.COLUMN;
|
|
141
142
|
if (D) {
|
|
142
|
-
const
|
|
143
|
-
|
|
143
|
+
const S = l(n, "legend", "position");
|
|
144
|
+
S === "left" ? (f = c.ROW, n.legend.orientation || (n.legend.orientation = N.VERTICAL)) : S === "right" ? (f = c.ROW_REVERSE, n.legend.orientation || (n.legend.orientation = N.VERTICAL)) : S === "bottom" && (f = c.COLUMN_REVERSE);
|
|
144
145
|
}
|
|
145
146
|
const P = {
|
|
146
147
|
id: "spacer",
|
|
@@ -158,22 +159,22 @@ class T {
|
|
|
158
159
|
y
|
|
159
160
|
],
|
|
160
161
|
{
|
|
161
|
-
direction:
|
|
162
|
+
direction: f
|
|
162
163
|
}
|
|
163
164
|
)
|
|
164
165
|
],
|
|
165
166
|
growth: i.STRETCH
|
|
166
167
|
}, E = [];
|
|
167
|
-
if (b ||
|
|
168
|
+
if (b || t) {
|
|
168
169
|
E.push(L);
|
|
169
|
-
const
|
|
170
|
+
const S = {
|
|
170
171
|
id: "spacer",
|
|
171
172
|
components: [
|
|
172
|
-
new F(this.model, this.services,
|
|
173
|
+
new F(this.model, this.services, t ? { size: 15 } : void 0)
|
|
173
174
|
],
|
|
174
175
|
growth: i.PREFERRED
|
|
175
176
|
};
|
|
176
|
-
E.push(
|
|
177
|
+
E.push(S);
|
|
177
178
|
}
|
|
178
179
|
return E.push(v), [
|
|
179
180
|
new se(this.model, this.services),
|
|
@@ -193,9 +194,9 @@ class u extends T {
|
|
|
193
194
|
}), this.model = new Te(this.services);
|
|
194
195
|
}
|
|
195
196
|
getAxisChartComponents(e, s) {
|
|
196
|
-
const
|
|
197
|
+
const n = this.model.getOptions(), t = l(n, "zoomBar", $.TOP, "enabled"), h = l(n, "toolbar", "enabled");
|
|
197
198
|
this.services.cartesianScales.determineAxisDuality(), this.services.cartesianScales.findDomainAndRangeAxes(), this.services.cartesianScales.determineOrientation();
|
|
198
|
-
const
|
|
199
|
+
const m = this.services.cartesianScales.getMainXAxisPosition(), b = l(n, "axes", m, "scaleType"), O = t && m === $.BOTTOM && b === Ie.TIME, x = this.services.zoom.isZoomBarLocked($.TOP), L = !!this.model.getOptions().title, y = {
|
|
199
200
|
id: "title",
|
|
200
201
|
components: [new _(this.model, this.services)],
|
|
201
202
|
growth: i.STRETCH
|
|
@@ -203,7 +204,7 @@ class u extends T {
|
|
|
203
204
|
id: "toolbar",
|
|
204
205
|
components: [new z(this.model, this.services)],
|
|
205
206
|
growth: i.PREFERRED
|
|
206
|
-
},
|
|
207
|
+
}, f = {
|
|
207
208
|
id: "header",
|
|
208
209
|
components: [
|
|
209
210
|
new g(
|
|
@@ -235,11 +236,11 @@ class u extends T {
|
|
|
235
236
|
components: e,
|
|
236
237
|
growth: i.STRETCH,
|
|
237
238
|
renderType: A.SVG
|
|
238
|
-
}, E =
|
|
239
|
-
let
|
|
239
|
+
}, E = l(s, "legend", "enabled") !== !1 && this.model.getOptions().legend.enabled !== !1;
|
|
240
|
+
let S = c.COLUMN;
|
|
240
241
|
if (E) {
|
|
241
|
-
const G =
|
|
242
|
-
G === K.LEFT ? (
|
|
242
|
+
const G = l(this.model.getOptions(), "legend", "position");
|
|
243
|
+
G === K.LEFT ? (S = c.ROW, this.model.getOptions().legend.orientation || (this.model.getOptions().legend.orientation = N.VERTICAL)) : G === K.RIGHT ? (S = c.ROW_REVERSE, this.model.getOptions().legend.orientation || (this.model.getOptions().legend.orientation = N.VERTICAL)) : G === K.BOTTOM && (S = c.COLUMN_REVERSE);
|
|
243
244
|
}
|
|
244
245
|
const ge = {
|
|
245
246
|
id: "spacer",
|
|
@@ -257,7 +258,7 @@ class u extends T {
|
|
|
257
258
|
v
|
|
258
259
|
],
|
|
259
260
|
{
|
|
260
|
-
direction:
|
|
261
|
+
direction: S
|
|
261
262
|
}
|
|
262
263
|
)
|
|
263
264
|
],
|
|
@@ -269,7 +270,7 @@ class u extends T {
|
|
|
269
270
|
renderType: A.SVG
|
|
270
271
|
}, H = [];
|
|
271
272
|
if (L || h) {
|
|
272
|
-
H.push(
|
|
273
|
+
H.push(f);
|
|
273
274
|
const G = {
|
|
274
275
|
id: "spacer",
|
|
275
276
|
components: [
|
|
@@ -361,7 +362,7 @@ class dt extends u {
|
|
|
361
362
|
}
|
|
362
363
|
class Ct extends u {
|
|
363
364
|
constructor(e, s) {
|
|
364
|
-
super(e, s), this.model = new
|
|
365
|
+
super(e, s), this.model = new fe(this.services), this.model.setOptions(a(r.bulletChart, s.options)), this.init(e, s);
|
|
365
366
|
}
|
|
366
367
|
getComponents() {
|
|
367
368
|
const e = [
|
|
@@ -377,14 +378,14 @@ class Ct extends u {
|
|
|
377
378
|
}
|
|
378
379
|
class ut extends T {
|
|
379
380
|
constructor(e, s) {
|
|
380
|
-
super(e, s), this.model = new
|
|
381
|
+
super(e, s), this.model = new Se(this.services), this.model.setOptions(
|
|
381
382
|
a(r.choroplethChart, s.options)
|
|
382
383
|
), this.init(e, s);
|
|
383
384
|
}
|
|
384
385
|
// Custom getChartComponents - Implements getChartComponents
|
|
385
386
|
// Removes zoombar support and additional `features` that are not supported in heatmap
|
|
386
387
|
getChartComponents(e, s) {
|
|
387
|
-
const
|
|
388
|
+
const n = this.model.getOptions(), t = l(n, "toolbar", "enabled"), h = !!this.model.getOptions().title, m = {
|
|
388
389
|
id: "title",
|
|
389
390
|
components: [new _(this.model, this.services)],
|
|
390
391
|
growth: i.STRETCH
|
|
@@ -400,8 +401,8 @@ class ut extends T {
|
|
|
400
401
|
this.services,
|
|
401
402
|
[
|
|
402
403
|
// always add title to keep layout correct
|
|
403
|
-
|
|
404
|
-
...
|
|
404
|
+
m,
|
|
405
|
+
...t ? [b] : []
|
|
405
406
|
],
|
|
406
407
|
{
|
|
407
408
|
direction: c.ROW,
|
|
@@ -424,7 +425,7 @@ class ut extends T {
|
|
|
424
425
|
components: e,
|
|
425
426
|
growth: i.STRETCH,
|
|
426
427
|
renderType: A.SVG
|
|
427
|
-
}, y =
|
|
428
|
+
}, y = l(s, "legend", "enabled") !== !1 && this.model.getOptions().legend.enabled !== !1, D = c.COLUMN_REVERSE, f = {
|
|
428
429
|
id: "spacer",
|
|
429
430
|
components: [new F(this.model, this.services, { size: 15 })],
|
|
430
431
|
growth: i.PREFERRED
|
|
@@ -436,7 +437,7 @@ class ut extends T {
|
|
|
436
437
|
this.services,
|
|
437
438
|
[
|
|
438
439
|
...y ? [x] : [],
|
|
439
|
-
...y ? [
|
|
440
|
+
...y ? [f] : [],
|
|
440
441
|
L
|
|
441
442
|
],
|
|
442
443
|
{
|
|
@@ -446,12 +447,12 @@ class ut extends T {
|
|
|
446
447
|
],
|
|
447
448
|
growth: i.STRETCH
|
|
448
449
|
}, v = [];
|
|
449
|
-
if (h ||
|
|
450
|
+
if (h || t) {
|
|
450
451
|
v.push(O);
|
|
451
452
|
const E = {
|
|
452
453
|
id: "spacer",
|
|
453
454
|
components: [
|
|
454
|
-
new F(this.model, this.services,
|
|
455
|
+
new F(this.model, this.services, t ? { size: 15 } : void 0)
|
|
455
456
|
],
|
|
456
457
|
growth: i.PREFERRED
|
|
457
458
|
};
|
|
@@ -491,48 +492,48 @@ const Q = {
|
|
|
491
492
|
class gt extends u {
|
|
492
493
|
constructor(e, s) {
|
|
493
494
|
super(e, s);
|
|
494
|
-
const
|
|
495
|
-
s.options.comboChartTypes || (console.error("No comboChartTypes defined for the Combo Chart!"),
|
|
495
|
+
const n = a(r.comboChart, s.options);
|
|
496
|
+
s.options.comboChartTypes || (console.error("No comboChartTypes defined for the Combo Chart!"), n.comboChartTypes = [{ type: R.LINE, correspondingDatasets: [] }]), this.model.setOptions(n), this.init(e, s);
|
|
496
497
|
}
|
|
497
498
|
getGraphComponents() {
|
|
498
499
|
const { comboChartTypes: e } = this.model.getOptions();
|
|
499
500
|
let s = 0;
|
|
500
|
-
const
|
|
501
|
-
const h =
|
|
502
|
-
let
|
|
503
|
-
if (typeof
|
|
504
|
-
if (!Object.keys(Q).includes(
|
|
501
|
+
const n = e.map((t) => {
|
|
502
|
+
const h = t.type;
|
|
503
|
+
let m;
|
|
504
|
+
if (typeof t.type == "string") {
|
|
505
|
+
if (!Object.keys(Q).includes(t.type))
|
|
505
506
|
return console.error(
|
|
506
|
-
`Invalid chart type "${
|
|
507
|
+
`Invalid chart type "${t.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`
|
|
507
508
|
), null;
|
|
508
509
|
let b = !1;
|
|
509
|
-
const O = `${qs(
|
|
510
|
-
return
|
|
510
|
+
const O = `${qs(t.type)}Chart`;
|
|
511
|
+
return m = V(
|
|
511
512
|
{},
|
|
512
513
|
r[O],
|
|
513
514
|
this.model.getOptions(),
|
|
514
|
-
|
|
515
|
-
),
|
|
515
|
+
t.options
|
|
516
|
+
), t.type === R.STACKED_AREA && (b = !0), Q[t.type].map(
|
|
516
517
|
(x) => new x(this.model, this.services, {
|
|
517
|
-
groups:
|
|
518
|
+
groups: t.correspondingDatasets,
|
|
518
519
|
id: s++,
|
|
519
|
-
options:
|
|
520
|
+
options: m,
|
|
520
521
|
stacked: b
|
|
521
522
|
})
|
|
522
523
|
);
|
|
523
524
|
} else
|
|
524
|
-
return
|
|
525
|
-
groups:
|
|
525
|
+
return m = V({}, this.model.getOptions(), t.options), new h(this.model, this.services, {
|
|
526
|
+
groups: t.correspondingDatasets,
|
|
526
527
|
id: s++,
|
|
527
|
-
options:
|
|
528
|
+
options: m
|
|
528
529
|
});
|
|
529
|
-
}).filter((
|
|
530
|
-
return gs(
|
|
530
|
+
}).filter((t) => t !== null);
|
|
531
|
+
return gs(n);
|
|
531
532
|
}
|
|
532
533
|
getComponents() {
|
|
533
534
|
const { comboChartTypes: e } = this.model.getOptions(), s = e.some(
|
|
534
535
|
(h) => h.type === R.STACKED_BAR || h.type === R.STACKED_AREA
|
|
535
|
-
),
|
|
536
|
+
), n = [
|
|
536
537
|
new d(this.model, this.services),
|
|
537
538
|
new w(this.model, this.services),
|
|
538
539
|
new C(this.model, this.services, {
|
|
@@ -541,13 +542,13 @@ class gt extends u {
|
|
|
541
542
|
...s ? [] : [new B(this.model, this.services)],
|
|
542
543
|
...this.getGraphComponents()
|
|
543
544
|
];
|
|
544
|
-
return this.getAxisChartComponents(
|
|
545
|
+
return this.getAxisChartComponents(n);
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
548
|
class Xs extends T {
|
|
548
549
|
// TODO - Optimize the use of "extending"
|
|
549
|
-
constructor(e, s,
|
|
550
|
-
super(e, s), this.model = new xe(this.services), !
|
|
550
|
+
constructor(e, s, n = !1) {
|
|
551
|
+
super(e, s), this.model = new xe(this.services), !n && (this.model.setOptions(a(r.pieChart, s.options)), this.init(e, s));
|
|
551
552
|
}
|
|
552
553
|
getComponents() {
|
|
553
554
|
const e = [
|
|
@@ -606,9 +607,9 @@ class Tt extends u {
|
|
|
606
607
|
// Custom getChartComponents - Implements getChartComponents
|
|
607
608
|
// Removes zoombar support and additional `features` that are not supported in heatmap
|
|
608
609
|
getAxisChartComponents(e, s) {
|
|
609
|
-
const
|
|
610
|
+
const n = this.model.getOptions(), t = l(n, "toolbar", "enabled");
|
|
610
611
|
this.services.cartesianScales.determineAxisDuality(), this.services.cartesianScales.findDomainAndRangeAxes(), this.services.cartesianScales.determineOrientation();
|
|
611
|
-
const h = !!this.model.getOptions().title,
|
|
612
|
+
const h = !!this.model.getOptions().title, m = {
|
|
612
613
|
id: "title",
|
|
613
614
|
components: [new _(this.model, this.services)],
|
|
614
615
|
growth: i.STRETCH
|
|
@@ -624,8 +625,8 @@ class Tt extends u {
|
|
|
624
625
|
this.services,
|
|
625
626
|
[
|
|
626
627
|
// always add title to keep layout correct
|
|
627
|
-
|
|
628
|
-
...
|
|
628
|
+
m,
|
|
629
|
+
...t ? [b] : []
|
|
629
630
|
],
|
|
630
631
|
{
|
|
631
632
|
direction: c.ROW,
|
|
@@ -648,7 +649,7 @@ class Tt extends u {
|
|
|
648
649
|
components: e,
|
|
649
650
|
growth: i.STRETCH,
|
|
650
651
|
renderType: A.SVG
|
|
651
|
-
}, y =
|
|
652
|
+
}, y = l(s, "legend", "enabled") !== !1 && this.model.getOptions().legend.enabled !== !1, D = c.COLUMN_REVERSE, f = {
|
|
652
653
|
id: "spacer",
|
|
653
654
|
components: [new F(this.model, this.services, { size: 15 })],
|
|
654
655
|
growth: i.PREFERRED
|
|
@@ -660,7 +661,7 @@ class Tt extends u {
|
|
|
660
661
|
this.services,
|
|
661
662
|
[
|
|
662
663
|
...y ? [x] : [],
|
|
663
|
-
...y ? [
|
|
664
|
+
...y ? [f] : [],
|
|
664
665
|
L
|
|
665
666
|
],
|
|
666
667
|
{
|
|
@@ -670,12 +671,12 @@ class Tt extends u {
|
|
|
670
671
|
],
|
|
671
672
|
growth: i.STRETCH
|
|
672
673
|
}, v = [];
|
|
673
|
-
if (h ||
|
|
674
|
+
if (h || t) {
|
|
674
675
|
v.push(O);
|
|
675
676
|
const E = {
|
|
676
677
|
id: "spacer",
|
|
677
678
|
components: [
|
|
678
|
-
new F(this.model, this.services,
|
|
679
|
+
new F(this.model, this.services, t ? { size: 15 } : void 0)
|
|
679
680
|
],
|
|
680
681
|
growth: i.PREFERRED
|
|
681
682
|
};
|
|
@@ -728,7 +729,7 @@ class Ot extends u {
|
|
|
728
729
|
return this.getAxisChartComponents(e);
|
|
729
730
|
}
|
|
730
731
|
}
|
|
731
|
-
class
|
|
732
|
+
class ft extends u {
|
|
732
733
|
constructor(e, s) {
|
|
733
734
|
super(e, s), this.model.setOptions(a(r.lollipopChart, s.options)), this.init(e, s);
|
|
734
735
|
}
|
|
@@ -746,16 +747,16 @@ class St extends u {
|
|
|
746
747
|
return this.getAxisChartComponents(e);
|
|
747
748
|
}
|
|
748
749
|
}
|
|
749
|
-
class
|
|
750
|
+
class St extends T {
|
|
750
751
|
constructor(e, s) {
|
|
751
|
-
var
|
|
752
|
+
var t;
|
|
752
753
|
super(e, s), this.model = new Le(this.services);
|
|
753
|
-
const
|
|
754
|
-
this.model.setOptions(
|
|
754
|
+
const n = (t = s.options.meter) != null && t.proportional ? V(J(r.proportionalMeterChart), s.options) : V(J(r.meterChart), s.options);
|
|
755
|
+
this.model.setOptions(n), this.init(e, s);
|
|
755
756
|
}
|
|
756
757
|
getComponents() {
|
|
757
758
|
const s = [
|
|
758
|
-
...
|
|
759
|
+
...l(this.model.getOptions(), "meter", "showLabels") ? [
|
|
759
760
|
// Meter has a unique dataset title within the graph
|
|
760
761
|
{
|
|
761
762
|
id: "meter-title",
|
|
@@ -781,12 +782,12 @@ class ft extends T {
|
|
|
781
782
|
growth: i.STRETCH,
|
|
782
783
|
renderType: A.SVG
|
|
783
784
|
}
|
|
784
|
-
],
|
|
785
|
+
], n = [
|
|
785
786
|
new g(this.model, this.services, s, {
|
|
786
787
|
direction: c.COLUMN
|
|
787
788
|
})
|
|
788
789
|
];
|
|
789
|
-
return this.getChartComponents(
|
|
790
|
+
return this.getChartComponents(n, {
|
|
790
791
|
graphFrameRenderType: A.HTML
|
|
791
792
|
});
|
|
792
793
|
}
|
|
@@ -924,9 +925,9 @@ export {
|
|
|
924
925
|
bo as AxisEvent,
|
|
925
926
|
Oo as AxisFlavor,
|
|
926
927
|
$ as AxisPositions,
|
|
927
|
-
|
|
928
|
+
fo as AxisTitleOrientations,
|
|
928
929
|
cn as Bar,
|
|
929
|
-
|
|
930
|
+
So as BarEvent,
|
|
930
931
|
es as BinnedRuler,
|
|
931
932
|
We as Boxplot,
|
|
932
933
|
pt as BoxplotChart,
|
|
@@ -936,7 +937,7 @@ export {
|
|
|
936
937
|
dt as BubbleChart,
|
|
937
938
|
$e as Bullet,
|
|
938
939
|
Ct as BulletChart,
|
|
939
|
-
|
|
940
|
+
fe as BulletChartModel,
|
|
940
941
|
xo as CalloutDirections,
|
|
941
942
|
Ge as CanvasChartClip,
|
|
942
943
|
ms as CanvasZoom,
|
|
@@ -953,7 +954,7 @@ export {
|
|
|
953
954
|
Lo as ChartTheme,
|
|
954
955
|
R as ChartTypes,
|
|
955
956
|
Ke as Choropleth,
|
|
956
|
-
|
|
957
|
+
Se as ChoroplethModel,
|
|
957
958
|
Je as CirclePack,
|
|
958
959
|
vt as CirclePackChart,
|
|
959
960
|
Ae as CirclePackChartModel,
|
|
@@ -1000,9 +1001,9 @@ export {
|
|
|
1000
1001
|
Ot as LineChart,
|
|
1001
1002
|
Vo as LineEvent,
|
|
1002
1003
|
os as Lollipop,
|
|
1003
|
-
|
|
1004
|
+
ft as LollipopChart,
|
|
1004
1005
|
is as Meter,
|
|
1005
|
-
|
|
1006
|
+
St as MeterChart,
|
|
1006
1007
|
Le as MeterChartModel,
|
|
1007
1008
|
ns as MeterTitle,
|
|
1008
1009
|
W as Modal,
|
|
@@ -1087,9 +1088,9 @@ export {
|
|
|
1087
1088
|
jt as computeTimeIntervalName,
|
|
1088
1089
|
$t as configurations,
|
|
1089
1090
|
Kt as defaultLegendAdditionalItems,
|
|
1090
|
-
|
|
1091
|
+
fn as degToRad,
|
|
1091
1092
|
En as diamond,
|
|
1092
|
-
|
|
1093
|
+
Sn as distanceBetweenPointOnCircAndVerticalDiameter,
|
|
1093
1094
|
Jt as formatDateTillMilliSeconds,
|
|
1094
1095
|
qt as formatTick,
|
|
1095
1096
|
Xt as getColorScale,
|