Andrea75
Andrea75

Reputation: 228

Highcharts: min value of y axis on the bottom of chart

I would like some help with this chart. If the series values are not 0.0, the minimum value of the chart is 0, and it's correctly on the bottom of the chart:

But if the values are all equal to 0.0, the y-axis line is shown in the middle of the chart:

I try to set

 {min: 0,}

on the y-axis, but it doesn't work. Obviously I can't set a max value because I have a dynamic data. How can I solve this?

Upvotes: 12

Views: 22015

Answers (1)

SteveP
SteveP

Reputation: 19093

If you can't set a max, you can set a minRange

yAxis: [{ // Primary yAxis
            min: 0,
            minRange: 0.1,

http://jsfiddle.net/tZayD/

Upvotes: 28

Related Questions