I have an array of objects that I want to display in highcharts. Each object has a name and a value.
I tried to get this to work by doing
var objects = objectArray[];
var objectNames = nameArray[];
var objectValues = valueArray[];
series: [{
data: objects.value,
name: objects.name
}]
It blew me up. So I tried to build the series as follows:
series: [{
data: objectValues,
name: objectNames
}]
This gave me data for the values, but the name was all of the names in the objectNames array ... for each individual piece of data. so I tried to use
series: [{
data: objectValues
},
{
data: objectNames
}]
As a result, a diagram appeared for objectValues, and in the legend - another option for names - which is completely unacceptable, because it makes no sense to have a series of labels, right?
, , foreach, . http://www.highcharts.com/docs/getting-started/how-to-set-options/ , " ".
, , - highcharts, , "" , . ? , highcharts ""?