fusioncharts / fusioncharts-dist

FusionCharts JavaScript Charting library. Over 95+ charts and 1,400+ maps to choose from, with integrations available for all popular JavaScript frameworks & back-end programming languages.
https://www.fusioncharts.com
Other
84 stars 46 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'start'). Occurs with empty chart data and breaks everything #35

Open vnikiten01 opened 2 years ago

vnikiten01 commented 2 years ago

Versions Seen: 3.15.1, 3.18.0

This error occurs when a chart is provided with emptyData. If 1 chart has empty data is cause all the other chart renderings to break as well.

Error thrown when provided emptyData. Uncaught TypeError: Cannot read properties of undefined (reading 'start'). See image below of error with stackTrace.

Image of charts working when provided with data. image

To cause error. I configure the first chart with empty data. image

Sample chart config with empty Data { "chartId": "onPremEntityCount2Hours", "source": { "options": { "yAxis": {}, "xAxis": { "initialInterval": { "from": 1640633195557, "to": 1640636795557 } }, "paletteColors": {} }, "data": [] } },

AyanBhadury commented 2 years ago

@vnikiten01 Could you try passing the value as null instead of an empty object and check once, also please replicate the issue here - https://jsfiddle.net/79z2arb8/