maxHeight: Number

Sets the maximum height of legend. Once the maximum height is reached, remaining legend items are not shown when horizontally stacked (while on top or bottom or plotArea) and a new column is created when items are vertically stacked (when displayed to the left or right of plotArea).


Default: Automatically calculated based on chart size.
Example: 100,200, 300 etc.

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
legend:{
  maxHeight: 200,
 },

 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.