Home Forums Report Bugs Too many labels Reply To: Too many labels



labelAutoFit considers parameters like the width of the chart, number of labels to be shown, the width of the labels, etc. and sets labelAngle, labelFontSize etc. to avoid the overlapping of labels.

Since we don’t have direct control over the graph margins, I actually measured what they were and simply applied a negative margin in the CSS to obtain an effective margin of zero. This sort of simple hack won’t work if I don’t know what the margin is a priori. To my mind, this is a problem with the API design. Deciding the amount of margin should be decoupled from the algorithm that auto-spaces the labels.

Can you please create a JSFiddle reproducing the above scenario and brief us further about the same.

Indranil Deo
Team CanvasJS