axisXIndex: Number

Setting axisXIndex lets you choose to which X axis the dataSeries should be attached.
In case of Multi-Series or Combinational Charts, one can assign some series to first X axis and rest to another axis.

This is helpful when dataSeries objects use different unit of measurement or range of data. By default, all series are plotted against first axis.


Default: 0
Options: 1,2,3…

Note
  • axisXIndex is applicable only when axisX is array of axis objects.
  • When axisXIndex value is more than the number of X-axis, it falls back to 0.


var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 data: [{
   axisXIndex: 1, 
  }
],
 .
 . 
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.