or
$J($chartD).kendoStockChart({
dataSource: wData,
series: [{
type:
"candlestick"
,
openField:
"open"
,
closeField:
"close"
,
highField:
"high"
,
lowField:
"low"
,
categoryField:
"cat"
,
notes:{
line: {
width: 2,
length: 2
},
label: {
font:
"10px arial"
}
},
tooltip:{
format:
"{4}:<br /> {0:n0} -- {3:n0}"
}
}],
categoryAxis:{
categories: cats,
type:
"category"
,
labels: {
font:
"9px arial,sans-serif"
,
rotation: 45,
// step: 0,
skip: 0
}
},
valueAxis: {
labels: {
format:
"N0"
}
}
});
console.log(wData);
$J($chartD).kendoStockChart({
dataSource: wData,
series: [{
type:
"candlestick"
,
openField:
"open"
,
highField:
"high"
,
lowField:
"low"
,
closeField:
"close"
}],
categoryAxis:{
categories: cats,
type:
"category"
},
valueAxis: {
labels: {
format:
"N0"
}
}
});
Consider the set of data below returned from a remote data source.
[
{
activityName:
"Scheduled"
,
hourlyActivities: [
{
hour: 8
,
activityCount: 5
},
{
hour:
12
,
activityCount: 11
}
]
},
{
activityName:
"Cancelled"
,
hourlyActivities: [
{
hour:
8
,
activityCount: 1
},
{
hour: 12
,
activityCount: 5
}
]
}
]
I'm trying to get a basic line chart that is grouped by activityName (displayed in legend), where the x axis is hour and the y axis is activityCount? Can I get an MVVM example on how to configure the chart and data source? I was able to achieve grouping when the data source was an array of simple objects (not grouped), but I don't know where to start when the data is grouped by the server.