@politicalwatch/tipi-uikit 1.7.2 → 1.7.4
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/package.json
CHANGED
|
@@ -261,8 +261,8 @@ class d3sunburst extends d3chart {
|
|
|
261
261
|
: this.cfg.tooltip.suffix;
|
|
262
262
|
|
|
263
263
|
const text = this.cfg.tooltip.suffix
|
|
264
|
-
? `<div>${d.data[this.cfg.key]
|
|
265
|
-
: `<div>${d.data[this.cfg.key]
|
|
264
|
+
? `<div>${d.target.data[this.cfg.key]}: ${d.target.value} ${label}</div>`
|
|
265
|
+
: `<div>${d.target.data[this.cfg.key]}: ${d.target.value}</div>`;
|
|
266
266
|
this.tooltip.html(text).classed('active', true);
|
|
267
267
|
})
|
|
268
268
|
.on('mouseout', () => {
|
|
@@ -356,7 +356,7 @@ class d3sunburst extends d3chart {
|
|
|
356
356
|
if (!d.parent) return false;
|
|
357
357
|
const deltaAngle = this.xScale(d.x1) - this.xScale(d.x0);
|
|
358
358
|
const r = Math.max(0, (this.yScale(d.y0) + this.yScale(d.y1)) / 2);
|
|
359
|
-
return d.data[this.cfg.key].length * this.cfg.charSpace < r * deltaAngle;
|
|
359
|
+
return d.target.data[this.cfg.key].length * this.cfg.charSpace < r * deltaAngle;
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
/**
|