titleTextAlign: String

Sets the text alignment of axisX title. This feature is useful whenever titleWrap is set to true, title length exceeds titleMaxWidth, and title is wrapped onto multiple lines.

Default: “left”
Options: “left”, “center”, “right”
var  chart =  new  CanvasJS.Chart("container", {
 .
 .
 axisX:{
	titleTextAlign: "center" // change to "left" / "right"
   },
 .
 . 
});
chart.render();

Try Editing The Code

  Also See:    


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