bhagyaMazire
Posts: 26
Joined: Mon Jun 27, 2022 9:25 am

Line chart not working properly on re-render on version 9.3.3 onwards

Line chart renders correctly for the first time.

However when data passed to the chart is updated the Line chart distorts.

In our use case, we are passing the data to the line chart from the subscription which gets updated after refresh interval say 10 seconds.

For the first time line chart is rendered correctly, however after refresh interval when chart data is updated, the line chart distorts.

This breaks on version 9.3.3 & 10.0.0. & was working fine on 8.2.2 & earlier version.

This is mainly observed when the line is having some angle.

When the line is slant (without any angle) this issue is not reproducible.

Please see this attachment
lineChart.png
lineChart.png (38.64 KiB) Viewed 1038 times
bhagyaMazire
Posts: 26
Joined: Mon Jun 27, 2022 9:25 am

Re: Line chart not working properly on re-render on version 9.3.3 onwards

bhagyaMazire wrote: Mon Jul 04, 2022 11:54 am Line chart renders correctly for the first time.

However when data passed to the chart is updated the Line chart distorts.

In our use case, we are passing the data to the line chart from the subscription which gets updated after refresh interval say 10 seconds.

For the first time line chart is rendered correctly, however after refresh interval when chart data is updated, the line chart distorts.

This breaks on version 9.3.3 & 10.0.0. & was working fine on 8.2.2 & earlier version.

This is mainly observed when the line is having some angle.

When the line is slant (without any angle) this issue is not reproducible.

Please see this attachment lineChart.png
PFA, one more example.
Attachments
Ex2.png
Ex2.png (47.11 KiB) Viewed 1033 times
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Line chart not working properly on re-render on version 9.3.3 onwards

Hello,

Could you reproduce the issue in an online editor? It will be easier to help me as I see the setup and how you update the chart and what data you provide.

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
bhagyaMazire
Posts: 26
Joined: Mon Jun 27, 2022 9:25 am

Re: Line chart not working properly on re-render on version 9.3.3 onwards

michal.f wrote: Mon Jul 04, 2022 7:39 pm Hello,

Could you reproduce the issue in an online editor? It will be easier to help me as I see the setup and how you update the chart and what data you provide.

Best regards!
Working on creating jsfiddle.
bhagyaMazire
Posts: 26
Joined: Mon Jun 27, 2022 9:25 am

Re: Line chart not working properly on re-render on version 9.3.3 onwards

bhagyaMazire wrote: Mon Jul 11, 2022 5:59 am
michal.f wrote: Mon Jul 04, 2022 7:39 pm Hello,

Could you reproduce the issue in an online editor? It will be easier to help me as I see the setup and how you update the chart and what data you provide.

Best regards!
Working on creating jsfiddle.
Hi,

Please check this jsfiddle -> https://jsfiddle.net/s17mjzxp/2/

Click on the Update button to reproduce the issue.
PFA,
LineChartDistortsOnRerender.png
LineChartDistortsOnRerender.png (89.54 KiB) Viewed 994 times
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Line chart not working properly on re-render on version 9.3.3 onwards

Hi,

If you are using category type on the x-axis you need to specify the x value in your data (x, index, name).

Code: Select all

[[0, 2], [1, 0], [2, 3]]
Demo: https://jsfiddle.net/BlackLabel/bd86f5ht/
API: https://api.highcharts.com/highcharts/xAxis.type

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
bhagyaMazire
Posts: 26
Joined: Mon Jun 27, 2022 9:25 am

Re: Line chart not working properly on re-render on version 9.3.3 onwards

michal.f wrote: Mon Jul 11, 2022 12:18 pm Hi,

If you are using category type on the x-axis you need to specify the x value in your data (x, index, name).

Code: Select all

[[0, 2], [1, 0], [2, 3]]
Demo: https://jsfiddle.net/BlackLabel/bd86f5ht/
API: https://api.highcharts.com/highcharts/xAxis.type

Let me know if you have any further questions!
Best regards!
Hi,

This solves the issue.

Thanks.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Line chart not working properly on re-render on version 9.3.3 onwards

That's great to hear! In case of any further questions, feel free to contact us again.

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”