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", {
	titleTextAlign: "center" // change to "left" / "right"

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