Set minRange in Highcharts at week, but doesn't work - highcharts

i have a problem with minRange
My chart is "time series, zoomable" type (i enabled also scrollbar for x-axis).
I would like to have minRange weekly when i zoom the chart, but doesn't work...
`http://jsfiddle.net/rax26mvb/`
why ?
thanks!

The minRange define maximum zoom level, when you zoom by selection. In your case you need to also define min/max values on xAxis.

Related

Set offset for first tick highchart xAxis

I try to put an offset in pixel before the first tick and after the last one on the x axis.
I dont find the propertie that does this.
Is there a way to do that?

Highcharts: minRange=1 creates -1 and 1 on a chart with one data point

I am playing with a chart with a one data point.
Here is the jsfiddle demo: http://jsfiddle.net/mddc/mfwyoj7j/7/
I notice that if I add
minRange: 1
-1 or 1 will show up on both sides of the data point on the X axis.
I am new to Highcharts. What does minRange=1 mean here? If it is useless, then it should not create any problems, right?
Is this a bug in Highcharts?
Thanks and regards.
See highcharts API doc here: http://api.highcharts.com/highstock#xAxis.minRange
minRange: the minimum range to display. The entire axis will not be allowed to
span over a smaller interval than this. For example, for a datetime
axis the main unit is milliseconds. If minRange is set to 3600000, you
can't zoom in more than to one hour.
So it is used to limit the zoom-in: you will not be able to zoom if the xAxis display less than 1

How to set min and max values for an axis?

I have some data that can have values in the range (0..100). Highcharts will sometimes label the axis from -10 to 110, which looks odd.
How can I prevent this? I can set a fixed min and max value for the axis, but if the current values happen to be between e.g. (50..60), I'd rather let Highcharts zoom in on the axis accordingly. Just don't want Highcharts to ever show anything outside of (0..100).
I could of course determine the appropriate min and max values myself every time I load data, but was hoping there would be some kind of minMin and maxMax setting?
So it looks like this isn't possible; opened a feature request.
Nowadays highcharts has floor and ceiling options for this use case.

Automatically set tickInterval depending on labels width

Is it possible to set tickInterval automatically depending on axis labels width in highcharts?
In the first case tick interval is fine, but in the second it is too small. How can I set optimal interval for different sets of values?
You can only use tickPositioner, which allows to define dynamic ticks http://api.highcharts.com/highstock#xAxis.tickPositioner

Changing the scale of yAxis on Highstock to draw plot line

I have a data, say 200, that should be plotted as yAxis line.
The default min and max value is set to say 300 and 500 respectively.
How can i draw the yAxis plotline dynamically and how to change the scale of yAxis dynamically?
Thanks in advance.
1) To add plotLine use chart.yAxis[0].addPlotLine(object). See docs
2) To change extremes use chart.yAxis[0].setExtremes(min, max). See docs

Resources