()
| 79 | } |
| 80 | |
| 81 | update_data() { |
| 82 | const sizes = this.get('sizes') || []; |
| 83 | const color = this.get('color') || []; |
| 84 | const labels = this.get('labels') || []; |
| 85 | |
| 86 | this.mark_data = Array.prototype.map.call(sizes, (d: number, i: number) => { |
| 87 | return { |
| 88 | size: d, |
| 89 | color: color[i], |
| 90 | label: labels[i] == null ? '' : labels[i], |
| 91 | index: i, |
| 92 | }; |
| 93 | }); |
| 94 | |
| 95 | this.updateColor(); |
| 96 | this.update_domains(); |
| 97 | this.trigger('data_updated'); |
| 98 | } |
| 99 | |
| 100 | private updateLabels() { |
| 101 | if (!this.mark_data) { |
no test coverage detected