set the x value for error bar chart - Javascript highcharts

Javascript examples for highcharts:Bar Chart

Description

set the x value for error bar chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>basic</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.1.js"></script> 
      <script type="text/javascript">
    $(function(){//from w w w  .  j  a  v  a 2 s.co  m
var chart = new Highcharts.Chart({
    chart: {
        renderTo:'container',
        type:'errorbar'
    },
    title:{
        text:'Chart Title'
    },
    credits:{enabled:false},
    legend:{
    },
    plotOptions: {
        series: {
            shadow:false,
            borderWidth:0,
        }
    },
    xAxis:{
        lineColor:'#999',
        lineWidth:1,
        tickColor:'#666',
        tickLength:3,
        title:{
            text:'X Axis Title'
        }
    },
    yAxis:{
        lineColor:'#999',
        lineWidth:1,
        tickColor:'#666',
        tickWidth:1,
        tickLength:3,
        gridLineColor:'#ddd',
        title:{
            text:'Y Axis Title',
            rotation:0,
            margin:50,
        }
    },
    series: [{
        data: [
             {x:0,low:0.05,high:0.2},
             [4,0.48,0.68],
             [10, 0.38, 0.58],
             [18, 0.16, 0.36],
             [24, 0.03, 0.23]
        ]
    }]
});
    });

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="height:400px;margin:1.5em 1em;"></div>  
   </body>
</html>

Related Tutorials