dwivy
Posts: 1
Joined: Mon Mar 01, 2021 10:50 am

Data value not match with range selector

Hi, when im move my range selector from 1m to All there will be different value with my data,

here's the different,

This is 6m (6 months) - True Value
https://prnt.sc/10a8v29

This is All - Not match with 6m
https://prnt.sc/10a8wcc

here's the code

Code: Select all

		credits: {
                    enabled: false
                },

                rangeSelector : {
                    selected: 1
                },

                tooltip: {
                    formatter: function () {
                        var d = parseFloat(this.y);
                        return Highcharts.dateFormat('%b %e, %Y', this.x) + ' Value is: ' + d;
                    }
                },

                exporting: {
                    enabled: false
                },

                series : [{
                    name : '".str_replace('IDDM', 'IDAMAN', str_replace('RD', '', $produk_id))."',
                    data : ".$jsonData."
                }]

How i can solve this? is it possible to reset data value after change the range selector?
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Data value not match with range selector

Hello dwivy!

Welcome to our forum and thanks for contacting us with your question!

Your data could be changed depending on your source. If your data is being changed there dynamically then you will see the difference on the chart. I'm afraid that without access to your data I can't help you.

Could you reproduce the issue in an online editor that I could work on? You can find a basic template in the link below. For now, it seems that your data is being changed and that's the reason why you get different values.

Demo:
https://jsfiddle.net/BlackLabel/Ldmh76qn/

Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Stock”