We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57bffae commit fd1caabCopy full SHA for fd1caab
src/charts/c3/c3-chart.component.js
@@ -97,9 +97,9 @@
97
chartData = ctrl.config;
98
if (chartData) {
99
chartData.bindto = '#' + $attrs.id;
100
- // always re-generate donut pct chart because it's colors
101
- // change based on data and thresholds
102
- if (!chart || $attrs.id.includes('donutPctChart')) {
+ // only re-generate donut pct chart if it has a threshold object
+ // because it's colors will change based on data and thresholds
+ if (!chart || ($attrs.id.includes('donutPctChart') && chartData.thresholds)) {
103
chart = c3.generate(chartData);
104
} else {
105
//if chart is already created, then we only need to re-load data
0 commit comments