Chart.js: Issue with dynamic loading of charts

Created on 30 Nov 2016  路  5Comments  路  Source: chartjs/Chart.js

Bug:
When charts are dynamically loaded using chartjs 2.x version,for multi line charts
Condition1: when first set of data is null and second set has data,chart is not getting rendered.
Condition2: But when first set has data and second set of data is null,chart gets rendered with first set data.
Please refer the following link where issue is reproduced
https://plnkr.co/edit/bb06a7TCVUPGGGWkcS5j?p=preview

Please have a look and check difference between canvas id 1 and 2

When we are getting data from database,it is really making a big issue as sometimes data will be there and sometimes data won't be there

Environment

needs test case support

All 5 comments

Hi,
I have tried with chart.js 2.3.0 also , but I am facing same issue. Could you please help in sorting this issue.
If you want me to share code with chart.js 2.3.0(plunker) also i will share.

Hi guys, i am also facing same issue while loading data dynamically from service. If first dataset array is null graph is not getting loaded.

@etimberg
Hi,
I have tried with chart.js 2.3.0 also , but I am facing same issue. Could you please help in sorting this issue.
If you want me to share code with chart.js 2.3.0(plunker) also i will share.

@mukkaravamsiprasad please share your code using v2.3.0

Closing since there is no test case

Was this page helpful?
0 / 5 - 0 ratings