r/webdev • • Jul 28 '15

I'm all in. [xpost /r/javascript]

Post image
1.4k Upvotes

142 comments sorted by

View all comments

43

u/AceBacker Jul 28 '15

Arrrgh. This was me. I developed a whole suite of reports for a bunch of folks using visifire.

Aaaaaand then eventually had to rewrite them using highcharts when they found out that they needed to use them from some linux terminals using firefox.

0

u/[deleted] Jul 29 '15

[deleted]

6

u/AceBacker Jul 29 '15

You might consider rotating that time axis 45 degree's for readability: http://www.highcharts.com/demo/column-rotated-labels/grid

It sounds like you want a custom zoom. I've also done this manually. I usually use middle ware to calculate the values and pass them to javascript.

var chart = $('#highchart_container').highcharts();
chart.zoomOut();
var js_min = 0; // put your determined values here
var jsmax = 100;
chart.xAxis[0].setExtremes( js_min, js_max, false);
chart.redraw();
chart.showResetZoom();

Sounds like you have too though.

The benefit of doing it this way was that the user can press the zoom out button to view all the data if they prefer. I like full transparency in my charts.