Parth
Posts: 7
Joined: Wed Aug 11, 2021 4:57 am

High charts Issue with stock bar chart multiple line series

It's working fine when all data available but issue happens when we select range in bar at bottom in angular 11

I don't know why this issue generated?

var datas = [{
data: [[1630175400000, 0],
[1630089000000, 0.47],
[1630002600000, -0.48],
[1629916200000, 0.38],
[1629829800000, 0.18],
[1629743400000, 0.91],
[1629657000000, 0.01],
[1629570600000, -0.2],
[1629484200000, 0.01],
[1629397800000, -0.66],
[1629311400000, 0.04],
[1629225000000, -0.63],
[1629138600000, 0.07],
[1629052200000, -0.02],
[1628965800000, 0],
[1628879400000, 0.24],
[1628793000000, -0.45],
[1628706600000, 0.21],
[1628620200000, -0.04],
[1628533800000, -0.34],
[1628447400000, -0.08],
[1628361000000, 0.03],
[1628274600000, -0.23],
[1628188200000, 0.29],
[1628101800000, -0.19],
[1628015400000, 0.2],
[1627929000000, -0.13],
[1627842600000, -0.06],
[1627756200000, 0.02],
[1627669800000, -0.36]],
id: "base1",
name: "Avg. growth rate",
type: "line"
},{data:[[1628533800000, 117.442863],
[1630175400000, 117.476804],
[1630089000000, 117.476804],
[1630002600000, 116.930384],
[1629916200000, 117.488726],
[1629829800000, 117.039701],
[1629743400000, 116.834498],
[1629657000000, 115.777653],
[1629570600000, 115.764878],
[1629484200000, 115.996878],
[1629397800000, 115.988679],
[1629311400000, 116.764601],
[1629225000000, 116.7125],
[1629138600000, 117.458283],
[1629052200000, 117.377938],
[1628965800000, 117.395677],
[1628879400000, 117.395677],
[1628793000000, 117.116852],
[1628706600000, 117.64148],
[1628620200000, 117.392843],
[1628533800000, 117.442863],
[1628447400000, 117.841829],
[1628361000000, 117.933245],
[1628274600000, 117.902974],
[1628188200000, 118.170114],
[1628101800000, 117.826993],
[1628015400000, 118.045463],
[1627929000000, 117.811225],
[1627842600000, 117.968985],
[1627756200000, 118.045426],
[1627669800000, 118.024255]],id: "base2"
name: "IN (GBP)"
type: "line"}]
Attachments
Untitled3.png
Untitled3.png (38.58 KiB) Viewed 727 times
Untitled2.png
Untitled2.png (45.06 KiB) Viewed 727 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: High charts Issue with stock bar chart multiple line series

Hello Parth,

Thanks for contacting us with your issue.

First of all, your sample data is not valid - it is missing two commas, but I assume you simply have overlooked it. Also, angular version has nothing to do with this issue.

The cause of your problem is the data order. To use the navigator your data must be sorted in ascending time order.
Demo: https://jsfiddle.net/BlackLabel/kzte42ha/2/
API reference: https://api.highcharts.com/highstock/navigator

Please always check the console in case of potential warnings and errors. I'm pretty sure you have received error 15 for unsorted data.
https://assets.highcharts.com/errors/15/

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”