Page 1 of 1
Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 3:01 am
by liddelljs
I have been doing a bit of research on highcharts with the aim of making the MX website charts dates selectable so I can chart historical date ranges. Has anyone done this with the standard MX charts? I managed to modify the js file to get the selectable dates on the chart but when I select the date range nothing happens so clearly more to it that I imagined.
Cheers
Steve
Re: Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 7:08 am
by steve
Can you give a link? It would probably make giving advice easier.
Re: Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 7:14 am
by liddelljs
Re: Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 7:26 am
by steve
I can't tell what you've changed. Your charts look just like the original ones, and it's not obvious to me what changes you've done to the javascript to implement selectable dates?
Re: Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 10:43 am
by liddelljs
Hi Steve,
I found a link on the highcharts website relating to the range selector (
http://www.highcharts.com/docs/chart-co ... e-selector). I simply replaced the range selector component of cumuluscharts.js for zoom, 6hr, 12hr and all in the standard MX web page trends with the range selector for all, which includes a custom date range.
Cheers
Steve
Re: Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 10:57 am
by steve
Isn't that the same range selector that is already configured in the MX charts? The MX charts don't have 'inputEnabled' set, so you don't get the date selector boxes. But I still can't see any difference between your charts and the standard MX ones.
Have you configured MX to supply more than 24 hours worth of data for the charts? It's going to make it very slow if you try to use too much data - how far back are you trying to go? For genuinely 'historical' data, you would be better off using one of the other methods that some people are using, involving an SQL database.
Re: Selectable date range with Highcharts
Posted: Sun 26 Jun 2016 12:22 pm
by liddelljs
Thanks Steve. I think I understand now how the charts are working and I hadn't configured them for more than 24 hrs of data - hence the reason the date ranges weren't working. I'll investigate the SQL database option.
Cheers
Steve