Get property of bar from JSON data

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 pineapple_zjw on 10th December 2012
Hello! I want to get the chart's property from the Json data :
var myJSONData = {
                           'chart.labels': ['Bob','Lucy','Gary','Hoolio'],
                           'chart.tooltips': [
                                              'Bob did well',
                                              'Lucy had her best result',
                                              'Gary - not so good',
                                              'Hoolio had a good start'
                                             ]
                          }
        
var myChart = new RGraph.Bar('cvs', [9,6,2,5]);
RGraph.SetConfig(myChart, myJSONData);
myChart.Draw();

If I alert the 'chart.labels' to display the data,the codes won't run abnormally.
However, if the name of the property is named without the symbol '.' in it ,the codes run normally,such as :
'chartlabels': ['Bob','Lucy','Gary','Hoolio']
Posted by RGraph Support on 10th December 2012
Hi,

What's the issue?

Add a reply




« Back to message list