Labels that have an apostrophe in them are causing problems

« 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"])


Add a reply

« Back to message list