Limit display of labels with Line chart

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Joachim on 14th April 2016
I'm use a large array of labels and corresponding data. When drawing a line chart the labels become unreadable because of their high number. So far I could not find an option to limit the display similar to "ylabelsCount" for line chart. How can I solve this problem? Do I have to code drawing x-axis instead with the drawing API?
Posted by Richard on 14th April 2016
Hi,

You can either omit labels - giving you extra space, or you can add \r\n to the start of every other label so they span two lines or you could use the textAngle option so that the labels are angled like this chart is:

www.rgraph.net/demos/bar-long-labels.html

Unrelated to this: you might also be interested in this too - better looking text using DOM text:

www.rgraph.net/tests/accessible-text/




Richard
Posted by Joachim on 14th April 2016
hi,

this is not applicable as I've more than 80 labels - no other solution?
Posted by Richard on 14th April 2016
Hi,

Only a key (HTML or canvas based - a HTML key would allow the text to flow better if there's a lot of it.




Richard

Add a reply




« Back to message list