itemWidth: Number

Sets the width of individual legend items after which the it gets wrapped or clipped depending on whether itemWrap is set to true (default) or false. itemWidth can’t be greater than itemMaxWidth and maxWidth of legend.

Default: Automatically calculated based on chart size.
Example: 100, 200, 300 etc.
Note
  • itemWidth can be used to align legend items.
var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
legend:{
  itemWidth: 200,
 },

 .
 .
});
chart.render();

Try Editing The Code

  Also See:    


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