@politicalwatch/tipi-uikit 1.7.14 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@politicalwatch/tipi-uikit",
3
- "version": "1.7.14",
3
+ "version": "1.7.15",
4
4
  "main": "src/components/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -187,12 +187,10 @@ 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.value)
196
194
  .sort((a, b) => b.name - a.name);
197
195
  return d3.partition()(root);
198
196
  };
@@ -248,8 +246,8 @@ class d3sunburst extends d3chart {
248
246
  .enter()
249
247
  .append('g')
250
248
  .attr('class', 'chart__slice-group chart__slice-group--sunburst clickable')
251
- .on('click', (d) => {
252
- window.event.stopPropagation();
249
+ .on('click', (event, d) => {
250
+ event.stopPropagation();
253
251
  this.focusOn(d);
254
252
  });
255
253