@carbon/charts-vue 1.19.3 → 1.20.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 +14 -0
- package/dist/index.mjs +15 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.20.0 (2024-08-28)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **tooltip:** pass datum to customHTML callback function
|
|
11
|
+
([#1879](https://github.com/carbon-design-system/carbon-charts/issues/1879))
|
|
12
|
+
([9a76784](https://github.com/carbon-design-system/carbon-charts/commit/9a767848c5d9f34d51b2616b904393f496c0f5fd)),
|
|
13
|
+
closes [#1518](https://github.com/carbon-design-system/carbon-charts/issues/1518)
|
|
14
|
+
|
|
15
|
+
# Change Log
|
|
16
|
+
|
|
17
|
+
All notable changes to this project will be documented in this file. See
|
|
18
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
19
|
+
|
|
6
20
|
## 1.19.3 (2024-08-19)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/dist/index.mjs
CHANGED
|
@@ -13845,28 +13845,28 @@ new vo();
|
|
|
13845
13845
|
class Ou extends dt {
|
|
13846
13846
|
constructor(t, n, r) {
|
|
13847
13847
|
super(t, n, r), this.type = "tooltip", this.renderType = Q.HTML, this.isEventListenerAdded = !1, this.lastTriggeredEventType = "", this.positionService = new vo(), this.handleShowTooltip = (i) => {
|
|
13848
|
-
const a = i.detail.data || i.detail.items;
|
|
13849
|
-
let
|
|
13850
|
-
const
|
|
13851
|
-
i.detail.content ?
|
|
13852
|
-
const
|
|
13848
|
+
const a = i.detail.data || i.detail.items, s = D(i.detail.event.target).datum();
|
|
13849
|
+
let o;
|
|
13850
|
+
const l = this.formatItems(this.getItems(i));
|
|
13851
|
+
i.detail.content ? o = `<div class="title-tooltip"><p>${Na(i.detail.content)}</p></div>` : o = Na(this.getTooltipHTML(l));
|
|
13852
|
+
const c = I.appendOrSelect(this.tooltip, "div.content-box");
|
|
13853
13853
|
if (b(this.getOptions(), "tooltip", "customHTML"))
|
|
13854
13854
|
if (i.detail.content) {
|
|
13855
|
-
const
|
|
13855
|
+
const u = `<div class="title-tooltip"><p>${Na(
|
|
13856
13856
|
i.detail.content
|
|
13857
13857
|
)}</p></div>`;
|
|
13858
|
-
|
|
13858
|
+
c.html(u);
|
|
13859
13859
|
} else
|
|
13860
|
-
|
|
13860
|
+
c.html(
|
|
13861
13861
|
`<div class="title-tooltip"><p>${Na(
|
|
13862
|
-
this.model.getOptions().tooltip.customHTML(a, s)
|
|
13862
|
+
this.model.getOptions().tooltip.customHTML(a, o, s)
|
|
13863
13863
|
)}</p></div>`
|
|
13864
13864
|
);
|
|
13865
13865
|
else
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
const
|
|
13869
|
-
|
|
13866
|
+
c.html(o);
|
|
13867
|
+
c.selectAll(".datapoint-tooltip").each(function(u, d) {
|
|
13868
|
+
const h = l[d];
|
|
13869
|
+
l[d] && l[d].color && D(this).select(".tooltip-color").attr("class", "tooltip-color").style("background-color", h.color);
|
|
13870
13870
|
}), this.positionTooltip(i), this.tooltip.classed("hidden", !1).attr("aria-hidden", !1), this.lastTriggeredEventType = i.type;
|
|
13871
13871
|
}, this.handleHideTooltip = () => {
|
|
13872
13872
|
this.tooltip.classed("hidden", !0).attr("aria-hidden", !0);
|
|
@@ -15515,6 +15515,7 @@ class Un extends dt {
|
|
|
15515
15515
|
return y.includes(E);
|
|
15516
15516
|
});
|
|
15517
15517
|
this.elementsToHighlight && this.elementsToHighlight.size() > 0 && !Kg(this.elementsToHighlight, v) && this.hideRuler(), v.dispatch("mouseover"), this.elementsToHighlight = v, this.services.events.dispatchEvent(S.Tooltip.SHOW, {
|
|
15518
|
+
event: t,
|
|
15518
15519
|
mousePosition: [n, r],
|
|
15519
15520
|
hoveredElement: h,
|
|
15520
15521
|
data: this.formatTooltipData(m)
|
|
@@ -17071,6 +17072,7 @@ class fI extends Un {
|
|
|
17071
17072
|
})).filter((E) => E.value !== 0);
|
|
17072
17073
|
if (O.length > 0) {
|
|
17073
17074
|
this.services.events.dispatchEvent(S.Tooltip.SHOW, {
|
|
17075
|
+
event: t,
|
|
17074
17076
|
mousePosition: [n, r],
|
|
17075
17077
|
hoveredElement: f,
|
|
17076
17078
|
items: [
|