samadhan17
Posts: 25
Joined: Mon Mar 09, 2020 9:37 am

Waterfall highstock with dynamic data on scrolling x-axis not updating properly

Hi, in my waterfall highstock, I am having dynamic data so start of waterfall chart works fine on first point from 0 but when I scrolled my x-axis then it should update its reference from recent column height but it is taking 0.

So with moving x-axis with scrollbar, I want waterfall chart to take last hidden column height and plot visible first column from that height not from 0.

Code: Select all

	 {
            chart: {
                zoomType: 'xy'
            },
            series: [{
                    type: 'waterfall',
               
                    data: [{x:1647958545 , y:130}, {x:1647958563 , y:330}, {x:1647958585 , y:-40}],
                    colorByPoint: true
                }],
            xAxis: {
                type: "datetime",
                max: maxDate, //these are updating on scroll axis
                min: minDate,//these are updating on scroll axis
                scrollbar: {
                    enabled: true
                },
                labels: {
                    formatter() {
                        return Highcharts.dateFormat(xLabelFormat, this.value);
                    }
                }
            }
        };
Image
Attachments
waterfall.JPG
waterfall.JPG (29.59 KiB) Viewed 422 times
samadhan17
Posts: 25
Joined: Mon Mar 09, 2020 9:37 am

Re: Waterfall highstock with dynamic data on scrolling x-axis not updating properly

I got solution. using cropThreshold.
As my data points are lagre in number and default cropThreshold is 50 so modified it with length of data points. and it resolved issue.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Waterfall highstock with dynamic data on scrolling x-axis not updating properly

HI samadhan17,

Glad to hear that you found the solution and thanks for sharing it.
In case of any further questions feel free to contact us again.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”