@carbon/charts 1.26.0 → 1.27.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/dist/{choropleth-CRH6Tnw6.mjs → choropleth-BYl1QP2B.mjs} +79 -56
- package/dist/choropleth-BYl1QP2B.mjs.map +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/interfaces/components.d.ts +5 -0
- package/dist/styles.css +6 -0
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- 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
- package/scss/graphs/_scatter-stacked.scss +2 -0
- package/scss/graphs/_scatter.scss +2 -0
- package/styles.css +6 -0
- package/styles.min.css +1 -1
- package/dist/choropleth-CRH6Tnw6.mjs.map +0 -1
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.27.0 (2025-09-22)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **Tooltip:** add customTotalCalculation function
|
|
11
|
+
([#2043](https://github.com/carbon-design-system/carbon-charts/issues/2043))
|
|
12
|
+
([a80744f](https://github.com/carbon-design-system/carbon-charts/commit/a80744ff40a58081bf175058de37f0e7ef76158a))
|
|
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.26.1 (2025-09-22)
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
- **scatter,scatterStacked:** use withiChartClip only with zoombar
|
|
24
|
+
([#2042](https://github.com/carbon-design-system/carbon-charts/issues/2042))
|
|
25
|
+
([a71fba6](https://github.com/carbon-design-system/carbon-charts/commit/a71fba6f4df65fea07e8ddfd5d616f0c39868f75))
|
|
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.26.0 (2025-09-22)
|
|
7
33
|
|
|
8
34
|
### Features
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Br, $ as ol, i as ll, a0 as cl, a1 as zr, a2 as Ur, a3 as ul, a4 as hl, a5 as dl, a6 as pl, a7 as Fr, a8 as ya, a9 as an, g as O, p as Kt, a as sn, C as Ea, aa as
|
|
1
|
+
import { t as Br, $ as ol, i as ll, a0 as cl, a1 as zr, a2 as Ur, a3 as ul, a4 as hl, a5 as dl, a6 as pl, a7 as Fr, a8 as ya, a9 as an, g as O, p as Kt, a as sn, C as Ea, aa as Et, w as Mt, ab as kn, E as xa, H as jt, ac as Wr, ad as Ls, c as fl, ae as xe, I as di, K as pi, e as se, af as yn, ag as ge, f as ye, x as ve, ah as gl, h as Je, O as ml, ai as Xr, aj as Re, z as xt, l as qt, ak as Gt, al as vl, M as yl, am as Yr, y as _t, q as dn, n as Bn, an as $s, ao as El, ap as xl, aq as fi, ar as Sa, A as Ae, as as Ta, at as Zr, au as Sl } from "./color-scale-utils-BzjNNGXE.mjs";
|
|
2
2
|
import { y as at, $ as b, N as Tt, r as be, q as ze, L as Tl, A as te, m as nt, s as Me, W as Qe, S as kt, e as J, Z as Ue, i as Xt, f as ba, J as Vs, d as bl, F as zn, n as Gs, H as Hs, C as Bs, p as Un, b as Oa, D as zs, U as Ol, x as we, a0 as Fn, O as Us } from "./axis-scales-CPuwbFQf.mjs";
|
|
3
3
|
import { R as lt } from "./a11y-ePqvrObQ.mjs";
|
|
4
4
|
import { t as ns, s as D, h as La, e as Ut, c as ss, f as Ce, g as oe, m as Fs, i as Aa, j as Ma, k as tn, l as Dt, n as wa, o as Ll, q as Al, u as zi, D as I, v as Ml, w as gi, G as Ca, x as hs, y as wl, a as Cl, p as bt, r as ka, b as kl } from "./angle-utils-BgkbNBqH.mjs";
|
|
@@ -3816,7 +3816,7 @@ class cm extends dt {
|
|
|
3816
3816
|
<table class="cds--data-table cds--data-table--no-border">
|
|
3817
3817
|
<thead>
|
|
3818
3818
|
<tr>
|
|
3819
|
-
${
|
|
3819
|
+
${Et(r, 0).map(
|
|
3820
3820
|
(o) => `<th scope="col">
|
|
3821
3821
|
<div class="cds--table-header-label">${ue(o)}</div>
|
|
3822
3822
|
</th>`
|
|
@@ -4915,7 +4915,7 @@ class fm extends $d {
|
|
|
4915
4915
|
value: m.value
|
|
4916
4916
|
})
|
|
4917
4917
|
), d.push({
|
|
4918
|
-
label:
|
|
4918
|
+
label: Et(n, "locale.translations.group") || Et(n, "tooltip.groupLabel"),
|
|
4919
4919
|
value: u[o],
|
|
4920
4920
|
color: this.model.getFillColor(u[o]),
|
|
4921
4921
|
class: this.model.getColorClassName({
|
|
@@ -4942,13 +4942,14 @@ class fm extends $d {
|
|
|
4942
4942
|
};
|
|
4943
4943
|
}).sort((u, p) => p.value - u.value)
|
|
4944
4944
|
), !r && O(n, "tooltip", "showTotal") === !0)) {
|
|
4945
|
-
const u = s.getRangeIdentifier();
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
),
|
|
4945
|
+
const u = s.getRangeIdentifier(), p = O(n, "tooltip", "customTotalCalculation");
|
|
4946
|
+
let f;
|
|
4947
|
+
p ? f = p(e) : f = e.reduce(
|
|
4948
|
+
(m, g) => m + g[u],
|
|
4949
|
+
0
|
|
4950
|
+
), d.push({
|
|
4951
|
+
label: Et(n, "tooltip.totalLabel") || Et(n, "locale.translations.total") || "Total",
|
|
4952
|
+
value: f,
|
|
4952
4953
|
bold: !0
|
|
4953
4954
|
});
|
|
4954
4955
|
}
|
|
@@ -6060,15 +6061,18 @@ class Qi extends dt {
|
|
|
6060
6061
|
render(t) {
|
|
6061
6062
|
if (!(O(this.getOptions(), "points", "enabled") || O(this.getOptions(), "bubble", "enabled")))
|
|
6062
6063
|
return;
|
|
6063
|
-
const n = this.
|
|
6064
|
-
|
|
6065
|
-
|
|
6064
|
+
const n = this.services.zoom?.isZoomBarEnabled() || !1, s = this.getComponentContainer({
|
|
6065
|
+
ariaLabel: "scatter points",
|
|
6066
|
+
withinChartClip: n
|
|
6067
|
+
}), a = this.getOptions(), { groupMapsTo: r } = a.data, { cartesianScales: o } = this.services;
|
|
6068
|
+
if (!o) throw new Error("Services cartesianScales are undefined.");
|
|
6069
|
+
const c = o.getDomainIdentifier(), l = s.selectAll("circle.dot").data(
|
|
6066
6070
|
this.getScatterData(),
|
|
6067
|
-
(
|
|
6071
|
+
(u) => `${u[r]}-${u[c]}`
|
|
6068
6072
|
);
|
|
6069
|
-
|
|
6070
|
-
const
|
|
6071
|
-
this.styleCircles(
|
|
6073
|
+
l.exit().attr("opacity", 0).remove();
|
|
6074
|
+
const d = l.enter().append("circle").classed("dot", !0).attr("opacity", 0).merge(l);
|
|
6075
|
+
this.styleCircles(d, t), this.addEventListeners();
|
|
6072
6076
|
}
|
|
6073
6077
|
// A value is an anomaly if is above all defined domain and range thresholds
|
|
6074
6078
|
isDatapointThresholdAnomaly(t) {
|
|
@@ -6135,7 +6139,11 @@ class Qi extends dt {
|
|
|
6135
6139
|
return null;
|
|
6136
6140
|
}
|
|
6137
6141
|
addEventListeners() {
|
|
6138
|
-
const t = this, { groupMapsTo: e } = t.getOptions().data, n = O(
|
|
6142
|
+
const t = this, { groupMapsTo: e } = t.getOptions().data, n = O(
|
|
6143
|
+
this.getOptions(),
|
|
6144
|
+
"tooltip",
|
|
6145
|
+
"alwaysShowRulerTooltip"
|
|
6146
|
+
);
|
|
6139
6147
|
if (!this.parent) throw new Error("Parent not defined");
|
|
6140
6148
|
const s = this.parent.selectAll("circle");
|
|
6141
6149
|
n ? s.style("pointer-events", "none") : s.style("pointer-events", null), s.on("mouseover", function(a, r) {
|
|
@@ -6713,13 +6721,13 @@ class ap extends dt {
|
|
|
6713
6721
|
useAttrs: !0
|
|
6714
6722
|
}), o = I.appendOrSelect(s, "svg.chart-skeleton").attr("width", a).attr("height", r).attr("role", "presentation"), c = e === 0 ? "pie" : "donut", l = O(this.getOptions(), c, "alignment");
|
|
6715
6723
|
I.appendOrSelect(o, "rect.chart-skeleton-area-container").attr("width", a).attr("height", r).attr("fill", "none");
|
|
6716
|
-
const h = Dn().innerRadius(e).outerRadius(t).startAngle(0).endAngle(Math.PI * 2), d = t + Math.abs(
|
|
6724
|
+
const h = Dn().innerRadius(e).outerRadius(t).startAngle(0).endAngle(Math.PI * 2), d = t + Math.abs(xt.radiusOffset), u = t + (Math.min(a, r) - t * 2) / 2, p = I.appendOrSelect(o, "path").attr("class", "skeleton-area-shape").attr("transform", `translate(${d}, ${u})`).attr("d", h).classed("shimmer-effect-areas", n).classed("empty-state-areas", !n).style(
|
|
6717
6725
|
"fill",
|
|
6718
6726
|
n ? `url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})` : null
|
|
6719
6727
|
);
|
|
6720
|
-
let f = t +
|
|
6721
|
-
l === te.CENTER ? f = a / 2 : l === te.RIGHT && (f = a - t -
|
|
6722
|
-
const m = t +
|
|
6728
|
+
let f = t + xt.xOffset;
|
|
6729
|
+
l === te.CENTER ? f = a / 2 : l === te.RIGHT && (f = a - t - xt.xOffset);
|
|
6730
|
+
const m = t + xt.yOffset;
|
|
6723
6731
|
p.attr("transform", `translate(${f}, ${m})`);
|
|
6724
6732
|
}
|
|
6725
6733
|
// same logic in pie
|
|
@@ -6727,7 +6735,7 @@ class ap extends dt {
|
|
|
6727
6735
|
const { width: t, height: e } = I.getSVGElementSize(this.parent, {
|
|
6728
6736
|
useAttrs: !0
|
|
6729
6737
|
});
|
|
6730
|
-
return Math.min(t, e) / 2 +
|
|
6738
|
+
return Math.min(t, e) / 2 + xt.radiusOffset;
|
|
6731
6739
|
}
|
|
6732
6740
|
// same logic in donut
|
|
6733
6741
|
computeInnerRadius() {
|
|
@@ -7481,14 +7489,14 @@ class Om extends Ko {
|
|
|
7481
7489
|
const s = this.parent, a = this.model.getOptions(), { cartesianScales: r } = this.services, o = r.getOrientation(), c = r.getRangeScale(), [l, h] = c.range(), d = r.getDomainScale(), u = d.invert(
|
|
7482
7490
|
o === Xt.VERTICAL ? e : n
|
|
7483
7491
|
), p = I.appendOrSelect(s, "g.ruler").attr("aria-label", "ruler"), f = I.appendOrSelect(p, "line.ruler-line"), g = s.selectAll("[role=graphics-symbol]").filter((v) => {
|
|
7484
|
-
if (parseFloat(
|
|
7492
|
+
if (parseFloat(Et(v, "data.x0")) <= u && parseFloat(Et(v, "data.x1")) >= u)
|
|
7485
7493
|
return !0;
|
|
7486
7494
|
});
|
|
7487
7495
|
if (g.size() > 0) {
|
|
7488
7496
|
this.elementsToHighlight && this.elementsToHighlight.size() > 0 && !uo(this.elementsToHighlight, g) && this.hideRuler(), g.dispatch("mouseover"), this.elementsToHighlight = g;
|
|
7489
|
-
const v = D(g.nodes()[0]).datum(), S = parseFloat(
|
|
7497
|
+
const v = D(g.nodes()[0]).datum(), S = parseFloat(Et(v, "data.x0")), y = parseFloat(Et(v, "data.x1")), E = this.model.getActiveDataGroupNames(), x = E.reverse().map((C) => ({
|
|
7490
7498
|
label: C,
|
|
7491
|
-
value:
|
|
7499
|
+
value: Et(v, `data.${C}`),
|
|
7492
7500
|
class: this.model.getColorClassName({
|
|
7493
7501
|
classNameTypes: [nt.TOOLTIP],
|
|
7494
7502
|
dataGroupName: C
|
|
@@ -7501,17 +7509,32 @@ class Om extends Ko {
|
|
|
7501
7509
|
hoveredElement: f,
|
|
7502
7510
|
items: [
|
|
7503
7511
|
{
|
|
7504
|
-
label:
|
|
7512
|
+
label: Et(a, "bins.rangeLabel") || "Range",
|
|
7505
7513
|
value: `${S} – ${y}`
|
|
7506
7514
|
},
|
|
7507
7515
|
...x,
|
|
7508
7516
|
...O(a, "tooltip", "showTotal") === !0 ? [
|
|
7509
7517
|
{
|
|
7510
|
-
label:
|
|
7511
|
-
value:
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7518
|
+
label: Et(a, "tooltip.totalLabel") || Et(a, "locale.translations.total") || "Total",
|
|
7519
|
+
value: (() => {
|
|
7520
|
+
const _ = O(
|
|
7521
|
+
a,
|
|
7522
|
+
"tooltip",
|
|
7523
|
+
"customTotalCalculation"
|
|
7524
|
+
);
|
|
7525
|
+
if (_) {
|
|
7526
|
+
const V = E.map(
|
|
7527
|
+
(R) => ({
|
|
7528
|
+
[R]: parseFloat(Et(v, `data.${R}`))
|
|
7529
|
+
})
|
|
7530
|
+
);
|
|
7531
|
+
return _(V);
|
|
7532
|
+
} else
|
|
7533
|
+
return E.reduce(
|
|
7534
|
+
(V, R) => V + parseFloat(Et(v, `data.${R}`)),
|
|
7535
|
+
0
|
|
7536
|
+
);
|
|
7537
|
+
})()
|
|
7515
7538
|
}
|
|
7516
7539
|
] : []
|
|
7517
7540
|
]
|
|
@@ -7905,7 +7928,7 @@ class $m extends dt {
|
|
|
7905
7928
|
const p = t.model.getOptions();
|
|
7906
7929
|
h = [
|
|
7907
7930
|
{
|
|
7908
|
-
label:
|
|
7931
|
+
label: Et(p, "locale.translations.total") || Et(p, "tooltip.totalLabel") || "Total",
|
|
7909
7932
|
value: n.value,
|
|
7910
7933
|
bold: !0
|
|
7911
7934
|
}
|
|
@@ -8004,7 +8027,7 @@ class gp extends dt {
|
|
|
8004
8027
|
t.addEventListener(b.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(b.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
|
|
8005
8028
|
}
|
|
8006
8029
|
getInnerRadius() {
|
|
8007
|
-
return
|
|
8030
|
+
return xt.innerRadius;
|
|
8008
8031
|
}
|
|
8009
8032
|
render(t = !0) {
|
|
8010
8033
|
const e = this, n = this.getComponentContainer({
|
|
@@ -8012,8 +8035,8 @@ class gp extends dt {
|
|
|
8012
8035
|
}), s = this.getOptions(), { groupMapsTo: a } = s.data, { valueMapsTo: r } = s.pie;
|
|
8013
8036
|
this.isRendering = !0;
|
|
8014
8037
|
const o = this.model.getDisplayData().filter((M) => M[r] > 0), c = this.computeRadius();
|
|
8015
|
-
this.arc = Dn().innerRadius(this.getInnerRadius()).outerRadius(c), this.hoverArc = Dn().innerRadius(this.getInnerRadius()).outerRadius(c +
|
|
8016
|
-
const h = nd().value((M) => M[r]).sort(O(s, "pie", "sortFunction")).padAngle(
|
|
8038
|
+
this.arc = Dn().innerRadius(this.getInnerRadius()).outerRadius(c), this.hoverArc = Dn().innerRadius(this.getInnerRadius()).outerRadius(c + xt.hoverArc.outerRadiusOffset);
|
|
8039
|
+
const h = nd().value((M) => M[r]).sort(O(s, "pie", "sortFunction")).padAngle(xt.padAngle)(o), u = I.appendOrSelect(n, "g.slices").attr("role", lt.GROUP).attr("data-name", "slices").selectAll("path.slice").data(h, (M) => M.data[a]);
|
|
8017
8040
|
u.exit().attr("opacity", 0).remove(), u.enter().append("path").classed("slice", !0).attr("opacity", 0).merge(u).attr(
|
|
8018
8041
|
"class",
|
|
8019
8042
|
(M) => this.model.getColorClassName({
|
|
@@ -8055,19 +8078,19 @@ class gp extends dt {
|
|
|
8055
8078
|
return M.textOffsetX = k / 2, M.textOffsetY = $ > 90 && $ < 270 ? 10 : 0, M.xPosition = (M.textOffsetX + L) * Math.sin(P), M.yPosition = (M.textOffsetY + L) * -Math.cos(P), M;
|
|
8056
8079
|
}).attr("transform", function(M, L) {
|
|
8057
8080
|
const P = S.length, $ = (M.endAngle - M.startAngle) * (180 / Math.PI);
|
|
8058
|
-
if (L >= P - 2 && $ <
|
|
8081
|
+
if (L >= P - 2 && $ < xt.callout.minSliceDegree) {
|
|
8059
8082
|
let k, G;
|
|
8060
|
-
return M.index === P - 1 ? (k = M.xPosition +
|
|
8083
|
+
return M.index === P - 1 ? (k = M.xPosition + xt.callout.offsetX + xt.callout.textMargin + M.textOffsetX, G = M.yPosition - xt.callout.offsetY, M.direction = Bs.RIGHT, T.push(M)) : (k = M.xPosition - xt.callout.offsetX - M.textOffsetX - xt.callout.textMargin, G = M.yPosition - xt.callout.offsetY, M.direction = Bs.LEFT, T.push(M)), `translate(${k}, ${G})`;
|
|
8061
8084
|
}
|
|
8062
8085
|
return `translate(${M.xPosition}, ${M.yPosition})`;
|
|
8063
8086
|
}), this.renderCallouts(T);
|
|
8064
8087
|
const C = O(s, "donut") ? "donut" : "pie", _ = O(s, C, "alignment"), { width: V } = I.getSVGElementSize(this.getParent(), {
|
|
8065
8088
|
useAttrs: !0
|
|
8066
|
-
}), R = v ?
|
|
8089
|
+
}), R = v ? xt.xOffset : 0, A = v ? xt.yOffset : 0;
|
|
8067
8090
|
let H = c + R;
|
|
8068
|
-
_ === te.CENTER ? H = V / 2 : _ === te.RIGHT && (H = V - c -
|
|
8091
|
+
_ === te.CENTER ? H = V / 2 : _ === te.RIGHT && (H = V - c - xt.xOffset);
|
|
8069
8092
|
let N = c + A;
|
|
8070
|
-
T.length > 0 && (N +=
|
|
8093
|
+
T.length > 0 && (N += xt.yOffsetCallout), n.attr("x", H + 7).attr("y", N), this.addEventListeners();
|
|
8071
8094
|
}
|
|
8072
8095
|
renderCallouts(t) {
|
|
8073
8096
|
const e = I.appendOrSelect(this.getComponentContainer(), "g.callouts").attr("role", lt.GROUP).attr("data-name", "callouts"), n = e.selectAll("g.callout").data(t);
|
|
@@ -8079,15 +8102,15 @@ class gp extends dt {
|
|
|
8079
8102
|
x: c,
|
|
8080
8103
|
y: l + o.textOffsetY
|
|
8081
8104
|
}, o.endPos = {
|
|
8082
|
-
x: c +
|
|
8083
|
-
y: l -
|
|
8084
|
-
}, o.intersectPointX = o.endPos.x -
|
|
8105
|
+
x: c + xt.callout.offsetX,
|
|
8106
|
+
y: l - xt.callout.offsetY + o.textOffsetY
|
|
8107
|
+
}, o.intersectPointX = o.endPos.x - xt.callout.horizontalLineLength) : (o.startPos = {
|
|
8085
8108
|
x: c,
|
|
8086
8109
|
y: l + o.textOffsetY
|
|
8087
8110
|
}, o.endPos = {
|
|
8088
|
-
x: c -
|
|
8089
|
-
y: l -
|
|
8090
|
-
}, o.intersectPointX = o.endPos.x +
|
|
8111
|
+
x: c - xt.callout.offsetX,
|
|
8112
|
+
y: l - xt.callout.offsetY + o.textOffsetY
|
|
8113
|
+
}, o.intersectPointX = o.endPos.x + xt.callout.horizontalLineLength), o;
|
|
8091
8114
|
}), s.append("line").classed("vertical-line", !0).merge(e.selectAll("line.vertical-line")).datum(function() {
|
|
8092
8115
|
return D(this.parentNode).datum();
|
|
8093
8116
|
}).style("stroke-width", "1px").attr("x1", (o) => o.startPos.x).attr("y1", (o) => o.startPos.y).attr("x2", (o) => o.intersectPointX).attr("y2", (o) => o.endPos.y), s.append("line").classed("horizontal-line", !0).merge(e.selectAll("line.horizontal-line")).datum(function() {
|
|
@@ -8157,7 +8180,7 @@ class gp extends dt {
|
|
|
8157
8180
|
const { width: t, height: e } = I.getSVGElementSize(this.parent, {
|
|
8158
8181
|
useAttrs: !0
|
|
8159
8182
|
}), n = this.getOptions(), s = Math.min(t, e) / 2;
|
|
8160
|
-
return n.pie.labels.enabled ? s +
|
|
8183
|
+
return n.pie.labels.enabled ? s + xt.radiusOffset : s;
|
|
8161
8184
|
}
|
|
8162
8185
|
}
|
|
8163
8186
|
class Vm extends gp {
|
|
@@ -8652,7 +8675,7 @@ class Bm extends dt {
|
|
|
8652
8675
|
return t !== zs.OFF && (t === zs.AUTO && Sa.minCellDividerDimension <= this.xBandwidth && Sa.minCellDividerDimension <= this.yBandwidth || t === zs.ON);
|
|
8653
8676
|
}
|
|
8654
8677
|
addEventListener() {
|
|
8655
|
-
const t = this, { cartesianScales: e } = this.services, n = this.getOptions(), s =
|
|
8678
|
+
const t = this, { cartesianScales: e } = this.services, n = this.getOptions(), s = Et(n, "locale.translations.total") || Et(n, "tooltip.totalLabel") || "Total", a = e.getDomainIdentifier(), r = e.getRangeIdentifier(), o = e.getDomainLabel(), c = e.getRangeLabel();
|
|
8656
8679
|
this.parent.selectAll("g.cell").on("mouseover", function(l, h) {
|
|
8657
8680
|
const d = D(this), u = d.select("rect.heat");
|
|
8658
8681
|
if (!u.classed("null-state")) {
|
|
@@ -8742,7 +8765,7 @@ class zm extends dt {
|
|
|
8742
8765
|
render(t) {
|
|
8743
8766
|
const e = this.getComponentContainer({
|
|
8744
8767
|
ariaLabel: "histogram bars"
|
|
8745
|
-
}), n = this.model.getOptions(), { groupIdentifier: s } = n, { groupMapsTo: a } = n.data, r = this.model.getBinnedStackedData(), o = this.services.cartesianScales.getMainXScale(), c = e.selectAll("g.bars").data(r, (h) =>
|
|
8768
|
+
}), n = this.model.getOptions(), { groupIdentifier: s } = n, { groupMapsTo: a } = n.data, r = this.model.getBinnedStackedData(), o = this.services.cartesianScales.getMainXScale(), c = e.selectAll("g.bars").data(r, (h) => Et(h, `0.${a}`));
|
|
8746
8769
|
c.exit().attr("opacity", 0).remove(), c.enter().append("g").classed("bars", !0).attr("role", lt.GROUP);
|
|
8747
8770
|
const l = e.selectAll("g.bars").selectAll("path.bar").data((h) => h);
|
|
8748
8771
|
l.exit().remove(), l.enter().append("path").merge(l).classed("bar", !0).attr(s, (h, d) => d).transition().call(
|
|
@@ -8759,7 +8782,7 @@ class zm extends dt {
|
|
|
8759
8782
|
originalClassName: "bar"
|
|
8760
8783
|
})
|
|
8761
8784
|
).style("fill", (h) => this.model.getFillColor(h[a], null, h)).attr("d", (h) => {
|
|
8762
|
-
const d =
|
|
8785
|
+
const d = Et(h, "data");
|
|
8763
8786
|
if (!d)
|
|
8764
8787
|
return;
|
|
8765
8788
|
const u = o(d.x1) - o(d.x0) - 1, p = this.services.cartesianScales.getDomainValue(d.x0), f = p + u, m = this.services.cartesianScales.getRangeValue(h[0]);
|
|
@@ -8777,13 +8800,13 @@ class zm extends dt {
|
|
|
8777
8800
|
r.on("mouseover", function(c, l) {
|
|
8778
8801
|
const h = D(this);
|
|
8779
8802
|
h.classed("hovered", !0);
|
|
8780
|
-
const d = s(parseFloat(
|
|
8803
|
+
const d = s(parseFloat(Et(l, "data.x0")), n), u = s(parseFloat(Et(l, "data.x1")), n), p = o.services.cartesianScales.getRangeAxisPosition(), f = o.services.cartesianScales.getScaleLabel(p);
|
|
8781
8804
|
a || o.services.events.dispatchEvent(b.Tooltip.SHOW, {
|
|
8782
8805
|
event: c,
|
|
8783
8806
|
hoveredElement: h,
|
|
8784
8807
|
items: [
|
|
8785
8808
|
{
|
|
8786
|
-
label:
|
|
8809
|
+
label: Et(t, "bins.rangeLabel") || "Range",
|
|
8787
8810
|
value: `${d} – ${u}`
|
|
8788
8811
|
},
|
|
8789
8812
|
{
|
|
@@ -8796,7 +8819,7 @@ class zm extends dt {
|
|
|
8796
8819
|
},
|
|
8797
8820
|
{
|
|
8798
8821
|
label: f,
|
|
8799
|
-
value:
|
|
8822
|
+
value: Et(l, `data.${l[e]}`)
|
|
8800
8823
|
}
|
|
8801
8824
|
]
|
|
8802
8825
|
});
|
|
@@ -10541,7 +10564,7 @@ class Qm extends dt {
|
|
|
10541
10564
|
value: r.value
|
|
10542
10565
|
},
|
|
10543
10566
|
{
|
|
10544
|
-
label:
|
|
10567
|
+
label: Et(t, "locale.translations.group") || Et(t, "tooltip.groupLabel") || "Group",
|
|
10545
10568
|
value: r[e],
|
|
10546
10569
|
class: n.model.getColorClassName({
|
|
10547
10570
|
classNameTypes: [nt.TOOLTIP],
|
|
@@ -10778,4 +10801,4 @@ export {
|
|
|
10778
10801
|
jm as y,
|
|
10779
10802
|
Gm as z
|
|
10780
10803
|
};
|
|
10781
|
-
//# sourceMappingURL=choropleth-
|
|
10804
|
+
//# sourceMappingURL=choropleth-BYl1QP2B.mjs.map
|