textAlign: String

Sets the text alignment of chart title. This feature is useful whenever wrap is set to true, title length exceeds maxWidth, and title is wrapped onto multiple lines.


Default: Depends on horizontalAlign
Options: “left”, “center”, “right”

var  chart =  new  CanvasJS.Chart("container", {
 .
 .
 title: {
	textAlign: "center" // change to "left" / "right"
   },
 .
 . 
});
chart.render();


Try it Yourself by Editing the Code below.



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