I have the following code:
if I replace the
Is this a bug or intended ?
var threshold = 100;
var throughputPer10min = [ 15, 26, 21, 40, 63,
16, 38, 79, 120, 54,
12, 56, 75, 102, 110,
130, 90, 75, 50, 5];
var startDate = new Date();
var chartData = [];
for (i = 0; i < throughputPer10min.length; i++) {
var date = new Date(startDate);
date.setMinutes(startDate.getMinutes() + (10 * i));
chartData.push({
"time": date,
"threshold": threshold,
"actual": throughputPer10min[i],
"below": Math.min(throughputPer10min[i], threshold),
"above": Math.max(0, throughputPer10min[i] - threshold)
});
}
var endDate = chartData[chartData.length - 1].time;
chartData[chartData.length - 1].threshold = threshold;
$("#testGraph").kendoChart({
dataSource:
{
data: chartData
},
valueAxis:
{
majorUnit: 50,
min: 0,
max: 150
},
categoryAxis:
{
field: "time",
baseUnit: "minutes",
type: "Date",
majorGridLines:
{
visible: false
},
majorTicks:
{
visible: false
},
labels:
{
step: 20
}
},
series: [
{
type: "area",
stack: true,
missingValues: "interpolate",
field: "below",
color: "#55F",
line: { color: "blue" },
},
{
type: "area",
stack: true,
missingValues: "interpolate",
field: "above",
color: "green"
},
{
type: "line",
field: "actual",
missingValues: "interpolate",
width: 1,
markers:
{
size: 0
},
name: "Actual Throughput"
},
{
type: "line",
field: "threshold",
missingValues: "interpolate",
name: "threshold",
color: "red",
dashType: "dash",
width: 1.5,
markers:
{
size:0
},
name: "Threshold line"
}
],
legend: {
visible: false
}
});
if I replace the
date.setMinutes(startDate.getMinutes() + (10 * i));
with getMinutes() + i, everything looks fine, otherwise, it looks as if I had used missingValues: "zero"Is this a bug or intended ?