@politicalwatch/tipi-uikit 1.7.14 → 1.7.16
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
|
@@ -187,14 +187,14 @@ class d3sunburst extends d3chart {
|
|
|
187
187
|
*/
|
|
188
188
|
bindData() {
|
|
189
189
|
const partition = (data) => {
|
|
190
|
+
console.log(data);
|
|
190
191
|
const root = d3
|
|
191
192
|
.hierarchy(data)
|
|
192
|
-
.sum((d) =>
|
|
193
|
-
console.log('d en binddata', d);
|
|
194
|
-
return d[this.cfg.value];
|
|
195
|
-
})
|
|
193
|
+
.sum((d) => d[this.cfg.value])
|
|
196
194
|
.sort((a, b) => b.name - a.name);
|
|
197
|
-
return d3
|
|
195
|
+
return d3
|
|
196
|
+
.partition()(root)
|
|
197
|
+
.each((d) => (d.current = d));
|
|
198
198
|
};
|
|
199
199
|
|
|
200
200
|
this.hData = partition(this.data[0]).descendants();
|
|
@@ -248,8 +248,8 @@ class d3sunburst extends d3chart {
|
|
|
248
248
|
.enter()
|
|
249
249
|
.append('g')
|
|
250
250
|
.attr('class', 'chart__slice-group chart__slice-group--sunburst clickable')
|
|
251
|
-
.on('click', (d) => {
|
|
252
|
-
|
|
251
|
+
.on('click', (event, d) => {
|
|
252
|
+
event.stopPropagation();
|
|
253
253
|
this.focusOn(d);
|
|
254
254
|
});
|
|
255
255
|
|