Labels missing the zero label on a Line graph

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 Rodolphe on 27th February 2014
Hello,

I'm rendering a Line graph for which I specify the labels like this:
.Set('labels', [0, 1, 2, 3])

But 0 is missing when the graph is displayed.
I found out that if I do this:
.Set('labels', ["0", 1, 2, 3])
everything works well and the zero label is displayed.

Is it the expected behaviour?
Are we supposed to use strings as labels?

Regards,
Posted by Richard on 27th February 2014
Hi there,

Yes - the labels should be strings:

obj.Set('labels', ['0', '1', '2', '3']);





Richard
Posted by Rodolphe on 27th February 2014
Thanks for the confirmation.

Add a reply




« Back to message list