Often we see that highcharts are rendered perfectly when all data is passed correctly to the chart. But sometimes when there is some mistake in data we don't see highchart appear on the screen.
My question is what happens to chart when data is incorrect, is it absent from dom totally or it is present with small dimensions or it is hidden behind any other element?
I was working on highchart related task when this question came to my mind.
Whether it is present on dom when data is incorrect?
Highcharts might not render the chart if the provided data are not in the correct format - then you get the console error.
Check the following simplified example, where one of the y
values is a string - which is incorrect according to API. The Highcharts return the error #14
and the chart is not appearing in the DOM.
Demo: https://jsfiddle.net/BlackLabel/ermh9t57/
API Reference: https://api.highcharts.com/highcharts/series.line.data