I'm setting the datasource of the sparkline to a json result which has 365 days of data. I plan to use the sparkline to aggregate the data and plot a smaller subset of data points as 365 is not something you'd want to plot in a small area. I set the baseUnit of the date categoryAxis to months so it will plot 12 points, which it does, but the width is out of control... it spans way beyond the confines of my plot area.
I think the problem lies with the width algorithm of sparklines when using baseUnits/aggregate w/ a date category axis. Even though we are only plotting 12 points, the sparkline behaves as if it is plotting 365. Documentation states that, "The width of line, area and column sparklines is determined by the number of data points". Help me understand this... other charts are responsive yet the sparkline is not? The sparkline is not taking the final number of datapoints after baseUnits/aggregates are applied with the date axis.
I think the problem lies with the width algorithm of sparklines when using baseUnits/aggregate w/ a date category axis. Even though we are only plotting 12 points, the sparkline behaves as if it is plotting 365. Documentation states that, "The width of line, area and column sparklines is determined by the number of data points". Help me understand this... other charts are responsive yet the sparkline is not? The sparkline is not taking the final number of datapoints after baseUnits/aggregates are applied with the date axis.
$(
"#sparkQtyVehicles"
).kendoSparkline({
series: [{
name:
"QtyVehicles"
,
aggregate:
"avg"
,
type:
"column"
,
field:
"QtyVehicles"
}],
categoryAxis: {
type:
"date"
,
baseUnit:
"months"
,
field:
"Date"
},
tooltip: {
visible:
true
,
shared:
false
,
template: $(
'#sparkQtyVehiclesTemplate'
).html()
},
theme:
"bootstrap"
});