Set max min value for axis

Description

The following code shows how to set max min value for axis.

Example


<!DOCTYPE html>
<html>
<head>
  <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script>
<script type='text/javascript'>
$(function () {<!-- w w w . ja  v a2 s .c o m-->
    var chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
            type: 'line'
        },
        yAxis: {
            categories: ['Poor', 'Below Average', 'Average', "Good"],
            tickInterval: 0.25,
            max: 1,
            min: 0
        },
        series: [{
            data: [[0,0.25], [1,0.75]]
        }]
    });
});

</script>
</head>
<body>
  <script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
</body>
</html>

Click to view the demo





















Home »
  highcharts »
    Axis »




Axis
Axis Data
Axis Label
Axis Plot
Axis Tick
Axis Title