@carbon/charts-vue 1.11.21 → 1.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/CHANGELOG.md +26 -0
- package/README.md +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -18
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +4249 -781
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/package.json +13 -13
package/dist/index.mjs
CHANGED
|
@@ -10233,13 +10233,21 @@ class Ue {
|
|
|
10233
10233
|
}
|
|
10234
10234
|
exportToCSV() {
|
|
10235
10235
|
const t = this.getTabularDataArray().map(
|
|
10236
|
-
(
|
|
10236
|
+
(o) => o.map((l) => `"${l === "–" ? "–" : l}"`)
|
|
10237
10237
|
);
|
|
10238
10238
|
let n = "", r = "";
|
|
10239
|
-
t.forEach(function(
|
|
10240
|
-
r =
|
|
10239
|
+
t.forEach(function(o, l) {
|
|
10240
|
+
r = o.join(","), n += l < t.length ? r + `
|
|
10241
10241
|
` : r;
|
|
10242
|
-
})
|
|
10242
|
+
});
|
|
10243
|
+
const i = this.getOptions();
|
|
10244
|
+
let s = "myChart";
|
|
10245
|
+
const a = b(
|
|
10246
|
+
i,
|
|
10247
|
+
"fileDownload",
|
|
10248
|
+
"fileName"
|
|
10249
|
+
);
|
|
10250
|
+
typeof a == "function" ? s = a("csv") : typeof a == "string" && (s = a), this.services.files.downloadCSV(n, `${s}.csv`);
|
|
10243
10251
|
}
|
|
10244
10252
|
getTabularData(t) {
|
|
10245
10253
|
return Array.isArray(t) ? t : this.transformToTabularData(t);
|
|
@@ -11625,27 +11633,39 @@ class L extends on {
|
|
|
11625
11633
|
return this.model.get("holder");
|
|
11626
11634
|
}
|
|
11627
11635
|
exportToJPG() {
|
|
11628
|
-
const t = this, n = this.
|
|
11629
|
-
|
|
11636
|
+
const t = this, n = this.model.getOptions(), r = this.getHolder(), i = D(r);
|
|
11637
|
+
i.classed("filled", !0), _L(this.getMainContainer(), {
|
|
11630
11638
|
quality: 1,
|
|
11631
11639
|
// Remove toolbar
|
|
11632
|
-
filter: (
|
|
11633
|
-
}).then(function(
|
|
11634
|
-
var
|
|
11635
|
-
|
|
11640
|
+
filter: (s) => !(s.classList && s.classList.contains("cds--cc--toolbar"))
|
|
11641
|
+
}).then(function(s) {
|
|
11642
|
+
var a;
|
|
11643
|
+
let o = "myChart";
|
|
11644
|
+
const l = b(
|
|
11645
|
+
n,
|
|
11646
|
+
"fileDownload",
|
|
11647
|
+
"fileName"
|
|
11648
|
+
);
|
|
11649
|
+
typeof l == "function" ? o = l("jpg") : typeof l == "string" && (o = l), (a = t.services.files) == null || a.downloadImage(s, `${o}.jpg`), i.classed("filled", !1);
|
|
11636
11650
|
});
|
|
11637
11651
|
}
|
|
11638
11652
|
exportToPNG() {
|
|
11639
|
-
const t = this, n = this.
|
|
11640
|
-
|
|
11653
|
+
const t = this, n = this.model.getOptions(), r = this.getHolder(), i = D(r);
|
|
11654
|
+
i.classed("filled", !0), wL(this.getMainContainer(), {
|
|
11641
11655
|
quality: 1,
|
|
11642
11656
|
// Remove toolbar
|
|
11643
|
-
filter: (
|
|
11644
|
-
}).then(function(
|
|
11645
|
-
var
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11657
|
+
filter: (s) => !(s.classList && s.classList.contains("cds--cc--toolbar"))
|
|
11658
|
+
}).then(function(s) {
|
|
11659
|
+
var a;
|
|
11660
|
+
let o = "myChart";
|
|
11661
|
+
const l = b(
|
|
11662
|
+
n,
|
|
11663
|
+
"fileDownload",
|
|
11664
|
+
"fileName"
|
|
11665
|
+
);
|
|
11666
|
+
typeof l == "function" ? o = l("png") : typeof l == "string" && (o = l), (a = t.services.files) == null || a.downloadImage(s, `${o}.png`), i.classed("filled", !1);
|
|
11667
|
+
}).catch(function(s) {
|
|
11668
|
+
console.error("oops, something went wrong!", s);
|
|
11649
11669
|
});
|
|
11650
11670
|
}
|
|
11651
11671
|
toggleFullscreen() {
|