@carbon/charts 1.12.0 → 1.13.1
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-76cda8a8.mjs → _baseEach-8433307e.mjs} +2 -2
- package/dist/{_baseEach-76cda8a8.mjs.map → _baseEach-8433307e.mjs.map} +1 -1
- package/dist/{angle-utils-6b17e95b.mjs → angle-utils-8034b0e5.mjs} +69 -57
- package/dist/{angle-utils-6b17e95b.mjs.map → angle-utils-8034b0e5.mjs.map} +1 -1
- package/dist/{choropleth-17b85d55.mjs → choropleth-75258a8a.mjs} +261 -253
- package/dist/{choropleth-17b85d55.mjs.map → choropleth-75258a8a.mjs.map} +1 -1
- package/dist/{color-scale-utils-faf67b75.mjs → color-scale-utils-2eb80bd2.mjs} +798 -798
- package/dist/{color-scale-utils-faf67b75.mjs.map → color-scale-utils-2eb80bd2.mjs.map} +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/demo/index.mjs +5 -5
- package/dist/{index-b0e98af9.mjs → index-e91144ae.mjs} +3 -3
- package/dist/{index-b0e98af9.mjs.map → index-e91144ae.mjs.map} +1 -1
- package/dist/index.mjs +8 -8
- package/dist/interfaces/charts.d.ts +6 -0
- package/dist/model/index.mjs +22 -14
- package/dist/model/index.mjs.map +1 -1
- package/dist/services/index.mjs +3 -3
- package/dist/tools.d.ts +1 -1
- package/dist/umd/bundle.umd.js +13 -13
- package/dist/umd/bundle.umd.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.13.1 (2023-09-18)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **pie-donut:** formatter not recieving entire value
|
|
11
|
+
([#1662](https://github.com/carbon-design-system/carbon-charts/issues/1662))
|
|
12
|
+
([9facba4](https://github.com/carbon-design-system/carbon-charts/commit/9facba43ac812edd191468f85edba0c64856f83e))
|
|
13
|
+
|
|
14
|
+
# Change Log
|
|
15
|
+
|
|
16
|
+
All notable changes to this project will be documented in this file. See
|
|
17
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
18
|
+
|
|
19
|
+
# 1.13.0 (2023-09-15)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
- **exports:** custom fileDownload.fileName function
|
|
24
|
+
([#1661](https://github.com/carbon-design-system/carbon-charts/issues/1661))
|
|
25
|
+
([1dc22cc](https://github.com/carbon-design-system/carbon-charts/commit/1dc22cc73cba69d8fd1a06ff761e2f28797157a7))
|
|
26
|
+
|
|
27
|
+
# Change Log
|
|
28
|
+
|
|
29
|
+
All notable changes to this project will be documented in this file. See
|
|
30
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
31
|
+
|
|
6
32
|
# 1.12.0 (2023-09-05)
|
|
7
33
|
|
|
8
34
|
### Features
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as f, k as t, i as h } from "./color-scale-utils-
|
|
1
|
+
import { b as f, k as t, i as h } from "./color-scale-utils-2eb80bd2.mjs";
|
|
2
2
|
function i(a, e) {
|
|
3
3
|
return a && f(a, e, t);
|
|
4
4
|
}
|
|
@@ -18,4 +18,4 @@ const v = E;
|
|
|
18
18
|
export {
|
|
19
19
|
v as b
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=_baseEach-
|
|
21
|
+
//# sourceMappingURL=_baseEach-8433307e.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_baseEach-
|
|
1
|
+
{"version":3,"file":"_baseEach-8433307e.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js"],"sourcesContent":["import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","baseEach$1"],"mappings":";AAWA,SAASA,EAAWC,GAAQC,GAAU;AACpC,SAAOD,KAAUE,EAAQF,GAAQC,GAAUE,CAAI;AACjD;ACHA,SAASC,EAAeC,GAAUC,GAAW;AAC3C,SAAO,SAASC,GAAYN,GAAU;AACpC,QAAIM,KAAc;AAChB,aAAOA;AAET,QAAI,CAACC,EAAYD,CAAU;AACzB,aAAOF,EAASE,GAAYN,CAAQ;AAMtC,aAJIQ,IAASF,EAAW,QACpBG,IAAQJ,IAAYG,IAAS,IAC7BE,IAAW,OAAOJ,CAAU,IAExBD,IAAYI,MAAU,EAAEA,IAAQD,MAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACX;AACA;AClBA,IAAIK,IAAWR,EAAeL,CAAU;AAExC,MAAAc,IAAeD;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { select as m } from "d3";
|
|
2
|
-
import { a as fe, c as O, r as de, g as
|
|
2
|
+
import { a as fe, c as O, r as de, g as T, d as _ } from "./color-scale-utils-2eb80bd2.mjs";
|
|
3
3
|
import { _ as P, T as E, o as b } from "./enums-a96ef472.mjs";
|
|
4
4
|
var me = /\s/;
|
|
5
5
|
function ge(t) {
|
|
@@ -42,9 +42,9 @@ function Ie(t, e, n) {
|
|
|
42
42
|
return r = i = void 0, u = l, a = t.apply(C, S), a;
|
|
43
43
|
}
|
|
44
44
|
function R(l) {
|
|
45
|
-
return u = l, c = setTimeout(
|
|
45
|
+
return u = l, c = setTimeout(L, e), f ? w(l) : a;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function I(l) {
|
|
48
48
|
var S = l - o, C = l - u, U = e - S;
|
|
49
49
|
return d ? Te(U, s - C) : U;
|
|
50
50
|
}
|
|
@@ -52,11 +52,11 @@ function Ie(t, e, n) {
|
|
|
52
52
|
var S = l - o, C = l - u;
|
|
53
53
|
return o === void 0 || S >= e || S < 0 || d && C >= s;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function L() {
|
|
56
56
|
var l = M();
|
|
57
57
|
if (z(l))
|
|
58
58
|
return G(l);
|
|
59
|
-
c = setTimeout(
|
|
59
|
+
c = setTimeout(L, I(l));
|
|
60
60
|
}
|
|
61
61
|
function G(l) {
|
|
62
62
|
return c = void 0, h && r ? w(l) : (r = i = void 0, a);
|
|
@@ -67,17 +67,17 @@ function Ie(t, e, n) {
|
|
|
67
67
|
function he() {
|
|
68
68
|
return c === void 0 ? a : G(M());
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function $() {
|
|
71
71
|
var l = M(), S = z(l);
|
|
72
72
|
if (r = arguments, i = this, o = l, S) {
|
|
73
73
|
if (c === void 0)
|
|
74
74
|
return R(o);
|
|
75
75
|
if (d)
|
|
76
|
-
return clearTimeout(c), c = setTimeout(
|
|
76
|
+
return clearTimeout(c), c = setTimeout(L, e), w(o);
|
|
77
77
|
}
|
|
78
|
-
return c === void 0 && (c = setTimeout(
|
|
78
|
+
return c === void 0 && (c = setTimeout(L, e)), a;
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return $.cancel = ue, $.flush = he, $;
|
|
81
81
|
}
|
|
82
82
|
function Le(t, e) {
|
|
83
83
|
if (t.match(/^[a-z]+:\/\//i))
|
|
@@ -89,7 +89,7 @@ function Le(t, e) {
|
|
|
89
89
|
const n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
90
90
|
return n.head.appendChild(r), n.body.appendChild(i), e && (r.href = e), i.href = t, i.href;
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const De = (() => {
|
|
93
93
|
let t = 0;
|
|
94
94
|
const e = () => (
|
|
95
95
|
// eslint-disable-next-line no-bitwise
|
|
@@ -107,7 +107,7 @@ function v(t, e) {
|
|
|
107
107
|
const r = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
|
|
108
108
|
return r ? parseFloat(r.replace("px", "")) : 0;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function ve(t) {
|
|
111
111
|
const e = v(t, "border-left-width"), n = v(t, "border-right-width");
|
|
112
112
|
return t.clientWidth + e + n;
|
|
113
113
|
}
|
|
@@ -116,7 +116,7 @@ function Ae(t) {
|
|
|
116
116
|
return t.clientHeight + e + n;
|
|
117
117
|
}
|
|
118
118
|
function ee(t, e = {}) {
|
|
119
|
-
const n = e.width ||
|
|
119
|
+
const n = e.width || ve(t), r = e.height || Ae(t);
|
|
120
120
|
return { width: n, height: r };
|
|
121
121
|
}
|
|
122
122
|
function Fe() {
|
|
@@ -132,7 +132,7 @@ const p = 16384;
|
|
|
132
132
|
function $e(t) {
|
|
133
133
|
(t.width > p || t.height > p) && (t.width > p && t.height > p ? t.width > t.height ? (t.height *= p / t.width, t.width = p) : (t.width *= p / t.height, t.height = p) : t.width > p ? (t.height *= p / t.width, t.width = p) : (t.width *= p / t.height, t.height = p));
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function A(t) {
|
|
136
136
|
return new Promise((e, n) => {
|
|
137
137
|
const r = new Image();
|
|
138
138
|
r.decode = () => e(r), r.onload = () => e(r), r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = t;
|
|
@@ -165,11 +165,11 @@ function Be(t, e, n) {
|
|
|
165
165
|
const r = `.${t}:${e}`, i = n.cssText ? He(n) : Oe(n);
|
|
166
166
|
return document.createTextNode(`${r}{${i}}`);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function N(t, e, n) {
|
|
169
169
|
const r = window.getComputedStyle(t, n), i = r.getPropertyValue("content");
|
|
170
170
|
if (i === "" || i === "none")
|
|
171
171
|
return;
|
|
172
|
-
const s =
|
|
172
|
+
const s = De();
|
|
173
173
|
try {
|
|
174
174
|
e.className = `${e.className} ${s}`;
|
|
175
175
|
} catch {
|
|
@@ -179,16 +179,16 @@ function X(t, e, n) {
|
|
|
179
179
|
a.appendChild(Be(s, n, r)), e.appendChild(a);
|
|
180
180
|
}
|
|
181
181
|
function ke(t, e) {
|
|
182
|
-
|
|
182
|
+
N(t, e, ":before"), N(t, e, ":after");
|
|
183
183
|
}
|
|
184
|
-
const
|
|
185
|
-
woff:
|
|
186
|
-
woff2:
|
|
184
|
+
const X = "application/font-woff", J = "image/jpeg", Ve = {
|
|
185
|
+
woff: X,
|
|
186
|
+
woff2: X,
|
|
187
187
|
ttf: "application/font-truetype",
|
|
188
188
|
eot: "application/vnd.ms-fontobject",
|
|
189
189
|
png: "image/png",
|
|
190
|
-
jpg:
|
|
191
|
-
jpeg:
|
|
190
|
+
jpg: J,
|
|
191
|
+
jpeg: J,
|
|
192
192
|
gif: "image/gif",
|
|
193
193
|
tiff: "image/tiff",
|
|
194
194
|
svg: "image/svg+xml",
|
|
@@ -250,23 +250,23 @@ async function W(t, e, n) {
|
|
|
250
250
|
}
|
|
251
251
|
async function Ue(t) {
|
|
252
252
|
const e = t.toDataURL();
|
|
253
|
-
return e === "data:," ? t.cloneNode(!1) :
|
|
253
|
+
return e === "data:," ? t.cloneNode(!1) : A(e);
|
|
254
254
|
}
|
|
255
255
|
async function _e(t, e) {
|
|
256
256
|
if (t.currentSrc) {
|
|
257
257
|
const s = document.createElement("canvas"), a = s.getContext("2d");
|
|
258
258
|
s.width = t.clientWidth, s.height = t.clientHeight, a == null || a.drawImage(t, 0, 0, s.width, s.height);
|
|
259
259
|
const c = s.toDataURL();
|
|
260
|
-
return
|
|
260
|
+
return A(c);
|
|
261
261
|
}
|
|
262
262
|
const n = t.poster, r = V(n), i = await W(n, r, e);
|
|
263
|
-
return
|
|
263
|
+
return A(i);
|
|
264
264
|
}
|
|
265
265
|
async function qe(t) {
|
|
266
266
|
var e;
|
|
267
267
|
try {
|
|
268
268
|
if (!((e = t == null ? void 0 : t.contentDocument) === null || e === void 0) && e.body)
|
|
269
|
-
return await
|
|
269
|
+
return await F(t.contentDocument.body, {}, !0);
|
|
270
270
|
} catch {
|
|
271
271
|
}
|
|
272
272
|
return t.cloneNode(!1);
|
|
@@ -274,15 +274,15 @@ async function qe(t) {
|
|
|
274
274
|
async function je(t, e) {
|
|
275
275
|
return g(t, HTMLCanvasElement) ? Ue(t) : g(t, HTMLVideoElement) ? _e(t, e) : g(t, HTMLIFrameElement) ? qe(t) : t.cloneNode(!1);
|
|
276
276
|
}
|
|
277
|
-
const
|
|
278
|
-
async function
|
|
277
|
+
const Ne = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT";
|
|
278
|
+
async function Xe(t, e, n) {
|
|
279
279
|
var r, i;
|
|
280
280
|
let s = [];
|
|
281
|
-
return
|
|
281
|
+
return Ne(t) && t.assignedNodes ? s = y(t.assignedNodes()) : g(t, HTMLIFrameElement) && (!((r = t.contentDocument) === null || r === void 0) && r.body) ? s = y(t.contentDocument.body.childNodes) : s = y(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), s.length === 0 || g(t, HTMLVideoElement) || await s.reduce((a, c) => a.then(() => F(c, n)).then((o) => {
|
|
282
282
|
o && e.appendChild(o);
|
|
283
283
|
}), Promise.resolve()), e;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Je(t, e) {
|
|
286
286
|
const n = e.style;
|
|
287
287
|
if (!n)
|
|
288
288
|
return;
|
|
@@ -302,7 +302,7 @@ function Ye(t, e) {
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
function Ze(t, e) {
|
|
305
|
-
return g(e, Element) && (
|
|
305
|
+
return g(e, Element) && (Je(t, e), ke(t, e), Qe(t, e), Ye(t, e)), e;
|
|
306
306
|
}
|
|
307
307
|
async function Ke(t, e) {
|
|
308
308
|
const n = t.querySelectorAll ? t.querySelectorAll("use") : [];
|
|
@@ -313,7 +313,7 @@ async function Ke(t, e) {
|
|
|
313
313
|
const c = n[s].getAttribute("xlink:href");
|
|
314
314
|
if (c) {
|
|
315
315
|
const o = t.querySelector(c), u = document.querySelector(c);
|
|
316
|
-
!o && u && !r[c] && (r[c] = await
|
|
316
|
+
!o && u && !r[c] && (r[c] = await F(u, e, !0));
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
const i = Object.values(r);
|
|
@@ -328,8 +328,8 @@ async function Ke(t, e) {
|
|
|
328
328
|
}
|
|
329
329
|
return t;
|
|
330
330
|
}
|
|
331
|
-
async function
|
|
332
|
-
return !n && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((r) => je(r, e)).then((r) =>
|
|
331
|
+
async function F(t, e, n) {
|
|
332
|
+
return !n && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((r) => je(r, e)).then((r) => Xe(t, r, e)).then((r) => Ze(t, r)).then((r) => Ke(r, e));
|
|
333
333
|
}
|
|
334
334
|
const re = /url\((['"]?)([^'"]+?)\1\)/g, et = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, tt = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
335
335
|
function nt(t) {
|
|
@@ -374,7 +374,7 @@ async function se(t, e, n) {
|
|
|
374
374
|
const r = st(t, n);
|
|
375
375
|
return rt(r).reduce((s, a) => s.then((c) => it(c, a, e, n)), Promise.resolve(r));
|
|
376
376
|
}
|
|
377
|
-
async function
|
|
377
|
+
async function D(t, e, n) {
|
|
378
378
|
var r;
|
|
379
379
|
const i = (r = e.style) === null || r === void 0 ? void 0 : r.getPropertyValue(t);
|
|
380
380
|
if (i) {
|
|
@@ -384,7 +384,7 @@ async function L(t, e, n) {
|
|
|
384
384
|
return !1;
|
|
385
385
|
}
|
|
386
386
|
async function at(t, e) {
|
|
387
|
-
await
|
|
387
|
+
await D("background", t, e) || await D("background-image", t, e), await D("mask", t, e) || await D("mask-image", t, e);
|
|
388
388
|
}
|
|
389
389
|
async function ct(t, e) {
|
|
390
390
|
const n = g(t, HTMLImageElement);
|
|
@@ -521,11 +521,11 @@ async function mt(t, e) {
|
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
async function gt(t, e = {}) {
|
|
524
|
-
const { width: n, height: r } = ee(t, e), i = await
|
|
524
|
+
const { width: n, height: r } = ee(t, e), i = await F(t, e, !0);
|
|
525
525
|
return await mt(i, e), await ae(i, e), lt(i, e), await Me(i, n, r);
|
|
526
526
|
}
|
|
527
527
|
async function ce(t, e = {}) {
|
|
528
|
-
const { width: n, height: r } = ee(t, e), i = await gt(t, e), s = await
|
|
528
|
+
const { width: n, height: r } = ee(t, e), i = await gt(t, e), s = await A(i), a = document.createElement("canvas"), c = a.getContext("2d"), o = e.pixelRatio || Fe(), u = e.canvasWidth || n, f = e.canvasHeight || r;
|
|
529
529
|
return a.width = u * o, a.height = f * o, e.skipAutoScale || $e(a), a.style.width = `${u}`, a.style.height = `${f}`, e.backgroundColor && (c.fillStyle = e.backgroundColor, c.fillRect(0, 0, a.width, a.height)), c.drawImage(s, 0, 0, a.width, a.height), a;
|
|
530
530
|
}
|
|
531
531
|
async function pt(t, e = {}) {
|
|
@@ -576,8 +576,8 @@ class k extends oe {
|
|
|
576
576
|
}, i = (h) => {
|
|
577
577
|
h && Object.keys(r).forEach((w) => {
|
|
578
578
|
if (h[w]) {
|
|
579
|
-
const R = h[w],
|
|
580
|
-
R &&
|
|
579
|
+
const R = h[w], I = parseFloat(R);
|
|
580
|
+
R && I > r[w] && ("" + R).indexOf("%") === -1 && (r[w] = I);
|
|
581
581
|
}
|
|
582
582
|
});
|
|
583
583
|
}, s = {
|
|
@@ -617,8 +617,8 @@ class k extends oe {
|
|
|
617
617
|
}
|
|
618
618
|
try {
|
|
619
619
|
const h = {
|
|
620
|
-
width:
|
|
621
|
-
height:
|
|
620
|
+
width: T(e.node(), "width", "baseVal", "value"),
|
|
621
|
+
height: T(e.node(), "height", "baseVal", "value")
|
|
622
622
|
};
|
|
623
623
|
i(h);
|
|
624
624
|
} catch {
|
|
@@ -647,7 +647,7 @@ class k extends oe {
|
|
|
647
647
|
this.chartID = Math.floor((1 + Math.random()) * 281474976710656).toString(16);
|
|
648
648
|
}
|
|
649
649
|
addMainContainer() {
|
|
650
|
-
const e = this.model.getOptions(), n =
|
|
650
|
+
const e = this.model.getOptions(), n = T(e, "style", "prefix"), r = m(this.getHolder()).append("div").classed(`${_}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
|
|
651
651
|
r.append("g").attr("class", wt), this.mainContainer = r.node();
|
|
652
652
|
}
|
|
653
653
|
update() {
|
|
@@ -661,27 +661,39 @@ class k extends oe {
|
|
|
661
661
|
return this.model.get("holder");
|
|
662
662
|
}
|
|
663
663
|
exportToJPG() {
|
|
664
|
-
const e = this, n = this.
|
|
665
|
-
|
|
664
|
+
const e = this, n = this.model.getOptions(), r = this.getHolder(), i = m(r);
|
|
665
|
+
i.classed("filled", !0), yt(this.getMainContainer(), {
|
|
666
666
|
quality: 1,
|
|
667
667
|
// Remove toolbar
|
|
668
|
-
filter: (
|
|
669
|
-
}).then(function(
|
|
670
|
-
var
|
|
671
|
-
|
|
668
|
+
filter: (s) => !(s.classList && s.classList.contains("cds--cc--toolbar"))
|
|
669
|
+
}).then(function(s) {
|
|
670
|
+
var o;
|
|
671
|
+
let a = "myChart";
|
|
672
|
+
const c = T(
|
|
673
|
+
n,
|
|
674
|
+
"fileDownload",
|
|
675
|
+
"fileName"
|
|
676
|
+
);
|
|
677
|
+
typeof c == "function" ? a = c("jpg") : typeof c == "string" && (a = c), (o = e.services.files) == null || o.downloadImage(s, `${a}.jpg`), i.classed("filled", !1);
|
|
672
678
|
});
|
|
673
679
|
}
|
|
674
680
|
exportToPNG() {
|
|
675
|
-
const e = this, n = this.
|
|
676
|
-
|
|
681
|
+
const e = this, n = this.model.getOptions(), r = this.getHolder(), i = m(r);
|
|
682
|
+
i.classed("filled", !0), pt(this.getMainContainer(), {
|
|
677
683
|
quality: 1,
|
|
678
684
|
// Remove toolbar
|
|
679
|
-
filter: (
|
|
680
|
-
}).then(function(
|
|
681
|
-
var
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
+
filter: (s) => !(s.classList && s.classList.contains("cds--cc--toolbar"))
|
|
686
|
+
}).then(function(s) {
|
|
687
|
+
var o;
|
|
688
|
+
let a = "myChart";
|
|
689
|
+
const c = T(
|
|
690
|
+
n,
|
|
691
|
+
"fileDownload",
|
|
692
|
+
"fileName"
|
|
693
|
+
);
|
|
694
|
+
typeof c == "function" ? a = c("png") : typeof c == "string" && (a = c), (o = e.services.files) == null || o.downloadImage(s, `${a}.png`), i.classed("filled", !1);
|
|
695
|
+
}).catch(function(s) {
|
|
696
|
+
console.error("oops, something went wrong!", s);
|
|
685
697
|
});
|
|
686
698
|
}
|
|
687
699
|
toggleFullscreen() {
|
|
@@ -837,4 +849,4 @@ export {
|
|
|
837
849
|
Ct as r,
|
|
838
850
|
j as t
|
|
839
851
|
};
|
|
840
|
-
//# sourceMappingURL=angle-utils-
|
|
852
|
+
//# sourceMappingURL=angle-utils-8034b0e5.mjs.map
|