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


Hi, Indranil. Thanks for your reply!

In the real chart, I’m using a custom label, so xValueType makes no apparent difference. I’ve left it out of the fiddle for simplicity since the formatter we use is configurable and injected from outside the chart component. At any rate, the same problem happens regardless of the exact format of the label.

I’m also hesitant to use labelAutoFit because it appears to make the margin unpredictable. To give you an idea of why this is a problem for us, we embed this chart in a container where the graph is completely flush with the borders on the left and right. 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.