fontSize: Number

Sets the font Size of Legend Text in pixels.


Default: 12
Example: 16,18,22 ..

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
legend:{
  fontSize: 30,
 },

 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



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

Comments 2

  1. Hi there,

    I have one issue with font scaling. Actually if height of diagram goes for example 500px, font goes too big. I defined in configuration font-size 16 but it doesn’t help. Here you have example http://prntscr.com/bebcxw

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