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 Editing The Code

  Also See:    


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

2 Comments

  1. Dejan says:

    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