titleBackgroundColor: String

Sets the axisX Title background color. The value of titleBackgroundColor can be “HTML Color Name”, “hex code”, or “rgba values”.

Default: “transparent”
Example: “red”,”#FABD76″,…
var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 axisX:{
       title: "Axis X Title",
       titleBackgroundColor:"#A4CBEF"
 },
 .
 . 
});
chart.render();

Try Editing The Code


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