Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

highcharts

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?

like image 478
Andrea75 Avatar asked Apr 04 '13 17:04

Andrea75


1 Answers

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

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

http://jsfiddle.net/tZayD/

like image 72
SteveP Avatar answered Oct 12 '22 13:10

SteveP