axisXType: String

Setting axisXType lets you choose between primary and secondary X Axis for a dataSeries to plot against. By choosing “secondary” Axis you can plot the series against axisX2.
In case of Multi-Series or Combinational Charts, one can assign primary axis to some series and secondary axis to other series.

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


Default: “primary”
Options: “primary”, “secondary”

Note
  • Properties for axisX2 (secondary axis) is same as axisX (primary axis).


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


Try it Yourself by Editing the Code below.

  Also See:    



If you have any questions, please feel free to ask in our forums.Ask Question