Hello,
I need to display a chart binded dynamically with multiple series of the same object type.
I managed to do that using the following chart parameters :
dataSource: {
data: data,
group: {
field:
"group"
}
}
where my data looks like this (this is only an example, data is actually:
var
data = [{
group:
"First"
,
category: 1,
value: 100
},
{
group:
"First"
,
category: 2,
value: 200
},
{
group:
"Second"
,
category: 1,
value: 200
},
{
group:
"Second"
,
category: 2,
value: 400
}];
However, this structure doesn't suit my other needs (such as displaying a table with one row per group), so I'd like to know if it's possible to display the same chart using data as following :
var
data = [{
group:
"First"
,
values: [{
category: 1,
value: 100
},
{
category: 2,
value: 200
}]
},
{
group:
"Second"
,
values: [{
category: 1,
value: 200
},
{
category: 2,
value: 400
}]
}];
How can I do that ?
Thanks a lot for your help.
Best regards