jQuery datepicker with Highstocks / Highcharts

后端 未结 2 1321
后悔当初
后悔当初 2021-01-05 07:25

How can I get a working jQuery datepicker with highcharts rangeselector?

This fiddle is an old example (from a highcharts author) which has the problem.

http

相关标签:
2条回答
  • 2021-01-05 07:55

    perhaps this will help

    Change range in Highstock dynamically

    I be able to update configuration of the displayed chart on the fly by accessing axis objects.

    0 讨论(0)
  • 2021-01-05 07:58

    You could set extremes once a date is selected, using your onSelect event and removing this.onchange().

    $.datepicker.setDefaults({
            dateFormat: 'yy-mm-dd',
            onSelect: function(dateText) {
                chart.xAxis[0].setExtremes($('input.highcharts-range-selector:eq(0)').datepicker("getDate").getTime(), $('input.highcharts-range-selector:eq(1)').datepicker("getDate").getTime()); 
                //this.onchange();
                this.onblur();
            }
        });
    

    Example:

    http://jsfiddle.net/BWEm5/542/

    0 讨论(0)
提交回复
热议问题