plot offset on line chart with categories - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

plot offset on line chart with categories

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
      <script type="text/javascript">
$(function () {//w w  w  .  j  a va  2s. co  m
    var chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container'
        },
        xAxis: {
            min: 1,
            categories: ['-13', '0', '1', '2', '3', '4']
        },
        yAxis: {
            min: 0,
            minPadding: 1
        },
        series: [{
            data: [-1,1,3,2,5]
        }]
    });
});

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

Related Tutorials