Labels having an apostrophe in the data

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 Mike on 24th February 2014
I am graphing scores for individuals and use their names in the labels. The following is an example of how I am setting the labels:

.Set('labels', ['John Smith', 'John O'Grady', 'Simon O'Neil', 'Alan Watson', 'Kim Jackson'])

The apostrophes in O'Grady and O'Neil are obviously causing a problem. I should very much appreciate your advice whether there is a solution to this problem other than to remove the apostrophes in the name and merely input OGrady and ONeil.

Many thanks for a great tool and for your assistance.
Posted by Richard on 24th February 2014
Hi there,

Use Double quotes to surround them:

.Set('labels', ["John Smith", "John O'Grady", "Simon O'Neil", "Alan Watson", "Kim Jackson"])

Richard, RGraph Support
If RGraph has helped you - please share the website - thanks!

Add a reply

« Back to message list