1- When you change the data prop to an empty array, the chart doesn't redraw and the old data stays there.
Now the Chartist.update method runs even if data array is empty.
2- If you start with an empty data array, the chart doesn't get drawn.
Now the chart is drawn even with empty data.
3- The error Object was just dead code at the end. We can just use the this.noData and this.message variables
1- When you change the data prop to an empty array, the chart doesn't redraw and the old data stays there. Now the Chartist.update method runs even if data array is empty.
2- If you start with an empty data array, the chart doesn't get drawn. Now the chart is drawn even with empty data.
3- The error Object was just dead code at the end. We can just use the
this.noData
andthis.message
variables