set dataLabels to display xAxis data instead of yAxis data in line charts? - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

set dataLabels to display xAxis data instead of yAxis data in line charts?

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" style="height: 400px"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  plotOptions: {//from   w ww .j  ava2 s. com
    series: {
      dataLabels: {
        enabled: true,
        format: '{point.customValue}'
      }
    }
  },
  series: [{
    data: [{
       x: 10,
      y: 15,
      customValue: '10x10'
    }]
  }]
});

      </script>  
   </body>
</html>

Related Tutorials