@carbon/charts 1.27.14 → 1.27.15
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 +9 -0
- package/dist/{angle-utils-Dy0Gf7Eb.mjs → angle-utils-Br0vKMAk.mjs} +2 -2
- package/dist/{angle-utils-Dy0Gf7Eb.mjs.map → angle-utils-Br0vKMAk.mjs.map} +1 -1
- package/dist/{array-D6ni_TQq.mjs → array-DpdUWKrC.mjs} +2 -2
- package/dist/{array-D6ni_TQq.mjs.map → array-DpdUWKrC.mjs.map} +1 -1
- package/dist/{choropleth-Bn8eKXA6.mjs → choropleth-Bqh-oBJ7.mjs} +30 -26
- package/dist/{choropleth-Bn8eKXA6.mjs.map → choropleth-Bqh-oBJ7.mjs.map} +1 -1
- package/dist/{color-scale-utils-C4KU2jNr.mjs → color-scale-utils--mwppOF8.mjs} +17 -21
- package/dist/{color-scale-utils-C4KU2jNr.mjs.map → color-scale-utils--mwppOF8.mjs.map} +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{index-CHbrPDmO.mjs → index-CNdgfXjZ.mjs} +3 -3
- package/dist/{index-CHbrPDmO.mjs.map → index-CNdgfXjZ.mjs.map} +1 -1
- package/dist/index.mjs +7 -7
- package/dist/interfaces/charts.d.ts +16 -0
- package/dist/model/heatmap.d.ts +7 -1
- package/dist/model/index.mjs +186 -180
- package/dist/model/index.mjs.map +1 -1
- package/dist/services/color-scale-utils.d.ts +15 -2
- package/dist/services/index.mjs +3 -3
- package/dist/umd/bundle.umd.cjs +8 -8
- package/dist/umd/bundle.umd.cjs.map +1 -1
- package/dist/umd/bundle.umd.js +8 -8
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as f, k as i, i as b } from "./color-scale-utils
|
|
1
|
+
import { b as f, k as i, i as b } from "./color-scale-utils--mwppOF8.mjs";
|
|
2
2
|
function h(r, n) {
|
|
3
3
|
return r && f(r, n, i);
|
|
4
4
|
}
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
g as c,
|
|
30
30
|
k as s
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=array-
|
|
32
|
+
//# sourceMappingURL=array-DpdUWKrC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-
|
|
1
|
+
{"version":3,"file":"array-DpdUWKrC.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js","../../../node_modules/d3/node_modules/d3-shape/src/constant.js","../../../node_modules/d3/node_modules/d3-shape/src/array.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","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","constant","x","slice","array"],"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,IAA6B,IAC7BC,IAAW,OAAOJ,CAAU,GAEF,EAAEG,IAAQD,KAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACT;AACF;AClBG,IAACK,IAAWR,EAAeL,CAAU;ACXzB,SAAAc,EAASC,GAAG;AACzB,SAAO,WAAoB;AACzB,WAAOA;AAAA,EACT;AACF;ACJU,IAACC,IAAQ,MAAM,UAAU;AAEpB,SAAAC,EAASF,GAAG;AACzB,SAAO,OAAOA,KAAM,YAAY,YAAYA,IACxCA,IACA,MAAM,KAAKA,CAAC;AAClB;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as qr, af as fl, i as gl, ag as ml, ah as jr, ai as Kr, aj as vl, ak as yl, al as El, am as Sl, an as Qr, ao as ba, ap as hn, g as O, p as ee, a as un, C as Oa, aq as Et, w as kt, X as Nn, E as La, H as te, ar as Jr, as as Ms, c as xl, a0 as be, I as yi, K as Ei, e as le, S as Tn, R as Ee, f as xe, x as Se, P as Tl, h as an, O as bl, at as to, au as Pe, z as xt, l as Jt, a2 as Ut, a1 as Ol, M as Ll, av as eo, y as Nt, q as vn, n as Fn, W as Us, aw as Al, ax as Ml, ay as Si, az as Aa, A as Ce, aA as Ma, aB as no, aC as wl } from "./color-scale-utils
|
|
1
|
+
import { t as qr, af as fl, i as gl, ag as ml, ah as jr, ai as Kr, aj as vl, ak as yl, al as El, am as Sl, an as Qr, ao as ba, ap as hn, g as O, p as ee, a as un, C as Oa, aq as Et, w as kt, X as Nn, E as La, H as te, ar as Jr, as as Ms, c as xl, a0 as be, I as yi, K as Ei, e as le, S as Tn, R as Ee, f as xe, x as Se, P as Tl, h as an, O as bl, at as to, au as Pe, z as xt, l as Jt, a2 as Ut, a1 as Ol, M as Ll, av as eo, y as Nt, q as vn, n as Fn, W as Us, aw as Al, ax as Ml, ay as Si, az as Aa, A as Ce, aA as Ma, aB as no, aC as wl } from "./color-scale-utils--mwppOF8.mjs";
|
|
2
2
|
import { z as rt, a0 as b, O as Tt, r as Ae, q as We, L as Cl, A as ie, m as st, t as _e, X as rn, S as Dt, e as Q, Z as Xe, i as qt, f as wa, K as Fs, d as _l, H as Wn, n as Ws, I as Xs, C as Ys, p as Xn, b as Ca, D as Zs, V as kl, y as ke, a1 as Yn, Q as qs } from "./axis-scales-CFRGPXH8.mjs";
|
|
3
3
|
import { R as ct } from "./a11y-ePqvrObQ.mjs";
|
|
4
|
-
import { t as as, s as D, h as _a, e as Xt, c as rs, f as Ie, g as de, m as js, i as ka, j as Ia, k as on, l as $t, n as Ra, o as Il, q as Rl, u as Zi, D as I, v as Dl, w as xi, G as Da, x as ps, y as Nl, a as Pl, p as Ot, r as Na, b as $l } from "./angle-utils-
|
|
5
|
-
import { b as so, c as pt, a as qi, s as Gl } from "./array-
|
|
4
|
+
import { t as as, s as D, h as _a, e as Xt, c as rs, f as Ie, g as de, m as js, i as ka, j as Ia, k as on, l as $t, n as Ra, o as Il, q as Rl, u as Zi, D as I, v as Dl, w as xi, G as Da, x as ps, y as Nl, a as Pl, p as Ot, r as Na, b as $l } from "./angle-utils-Br0vKMAk.mjs";
|
|
5
|
+
import { b as so, c as pt, a as qi, s as Gl } from "./array-DpdUWKrC.mjs";
|
|
6
6
|
function Vl(i, t, e, n) {
|
|
7
7
|
for (var s = -1, a = i == null ? 0 : i.length; ++s < a; )
|
|
8
8
|
e = t(e, i[s], s, i);
|
|
@@ -7696,44 +7696,48 @@ class Wm extends Wd {
|
|
|
7696
7696
|
n.html("");
|
|
7697
7697
|
return;
|
|
7698
7698
|
}
|
|
7699
|
-
const h = !Jr(a), d =
|
|
7699
|
+
const h = !Jr(a), d = O(
|
|
7700
|
+
e,
|
|
7701
|
+
this.chartType,
|
|
7702
|
+
"colorDomain"
|
|
7703
|
+
), u = Ll(this.model.getDisplayData(), d), p = !(s <= kt.color.barWidth), f = p ? kt.color.barWidth : s, m = I.appendOrSelect(n, "g.legend"), g = I.appendOrSelect(m, "g.legend-axis");
|
|
7700
7704
|
if (c) {
|
|
7701
|
-
const
|
|
7702
|
-
I.appendOrSelect(
|
|
7705
|
+
const M = I.appendOrSelect(n, "g.legend-title");
|
|
7706
|
+
I.appendOrSelect(M, "text").text(c).attr("dy", "0.7em"), m.attr("transform", "translate(0, 16)");
|
|
7703
7707
|
}
|
|
7704
|
-
const
|
|
7705
|
-
(o < 1 && o > 4 &&
|
|
7706
|
-
let
|
|
7707
|
-
const
|
|
7708
|
+
const v = u[0] < 0 && u[1] > 0 ? "diverge" : "mono";
|
|
7709
|
+
(o < 1 && o > 4 && v === "mono" || o < 1 && o > 2 && v === "diverge") && (o = 1);
|
|
7710
|
+
let x = [];
|
|
7711
|
+
const y = v === "diverge" ? 17 : 11;
|
|
7708
7712
|
if (h)
|
|
7709
|
-
|
|
7713
|
+
x = a;
|
|
7710
7714
|
else
|
|
7711
|
-
for (let
|
|
7712
|
-
|
|
7713
|
-
r === Ws.LINEAR ? `stop-color-${
|
|
7715
|
+
for (let M = 1; M < y + 1; M++)
|
|
7716
|
+
x.push(
|
|
7717
|
+
r === Ws.LINEAR ? `stop-color-${v}-${o}-${M}` : `fill-${v}-${o}-${M}`
|
|
7714
7718
|
);
|
|
7715
|
-
const
|
|
7716
|
-
|
|
7717
|
-
let
|
|
7719
|
+
const E = eo(u[0], u[1]), S = qc(E, 3), T = Pe().domain(u).range([0, f]), C = ji(T).tickSize(0).tickValues(S), { code: k, number: G } = O(e, "locale");
|
|
7720
|
+
C.tickFormat((M) => G(M, k));
|
|
7721
|
+
let R;
|
|
7718
7722
|
switch (r) {
|
|
7719
7723
|
case Ws.LINEAR:
|
|
7720
|
-
this.drawLinear(
|
|
7724
|
+
this.drawLinear(x, m, f);
|
|
7721
7725
|
break;
|
|
7722
7726
|
case Ws.QUANTIZE:
|
|
7723
|
-
|
|
7727
|
+
R = this.drawQuantize(
|
|
7728
|
+
x,
|
|
7724
7729
|
v,
|
|
7725
|
-
g,
|
|
7726
7730
|
h,
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
),
|
|
7731
|
+
m,
|
|
7732
|
+
f
|
|
7733
|
+
), T.range([R, f]);
|
|
7730
7734
|
break;
|
|
7731
7735
|
default:
|
|
7732
7736
|
throw Error("Entered color legend type is not supported.");
|
|
7733
7737
|
}
|
|
7734
|
-
|
|
7738
|
+
g.attr("transform", `translate(0,${kt.color.axisYTranslation})`).call(C), g.select(".domain").remove(), g.select("g.tick:last-of-type text").style("text-anchor", p ? "middle" : "end"), g.select("g.tick:first-of-type text").style(
|
|
7735
7739
|
"text-anchor",
|
|
7736
|
-
|
|
7740
|
+
p && this.chartType !== "choropleth" ? "middle" : "start"
|
|
7737
7741
|
);
|
|
7738
7742
|
}
|
|
7739
7743
|
// Renders gradient legend
|
|
@@ -10868,4 +10872,4 @@ export {
|
|
|
10868
10872
|
rv as y,
|
|
10869
10873
|
qm as z
|
|
10870
10874
|
};
|
|
10871
|
-
//# sourceMappingURL=choropleth-
|
|
10875
|
+
//# sourceMappingURL=choropleth-Bqh-oBJ7.mjs.map
|