verticalAlign: String

This property lets you align the Legend Position vertically.

Default: “bottom”
Example: “top”, “center”, “bottom”
Notes
  • By combining this with horizontalAlign, Legend can be aligned in nine positions on the chart.

  • Options horizontalAlign verticalAlign
    1 “left” “top”
    2 “left” “center”
    3 “left” “bottom”
    4 “center” “top”
    5 “center” “center”
    6 “center” “bottom”
    7 “right” “top”
    8 “right” “center”
    9 “right” “bottom”
var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 legend :{
  verticalAlign: "center",
 },
 .
 .
});
chart.render();

Try Editing The Code

  Also See:    


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