How to set Highcharts chart maximum yAxis value

后端 未结 3 1070
太阳男子
太阳男子 2020-12-08 18:11

I\'ve been trying for two days to find a way to set the maximum value of the yAxis on Highcharts.

I got a percentage column graphic

相关标签:
3条回答
  • 2020-12-08 18:39

    Taking help from above answer link mentioned in the above answer sets the max value with option

    yAxis: { max: 100 },
    

    On similar line min value can be set.So if you want to set min-max value then

    yAxis: {
       min: 0,     
       max: 100
    },
    

    If you are using HighRoller php library for integration if Highchart graphs then you just need to set the option

    $series->yAxis->min=0;
    $series->yAxis->max=100;
    
    0 讨论(0)
  • 2020-12-08 18:46

    Try this:

    yAxis: {min: 0, max: 100}
    

    See this jsfiddle example

    0 讨论(0)
  • 2020-12-08 19:06

    Alternatively one can use the setExtremes method also,

    yAxis.setExtremes(0, 100);
    

    Or if only one value is needed to be set, just leave other as null

    yAxis.setExtremes(null, 100);
    
    0 讨论(0)
提交回复
热议问题