hello:
I have a problem about StockChart. Our requirement is to add new data to the StockChart after I get the new data from server. the following code is just a test fragment. But the problem is in the update function when I add the new data to StockChart. the stockchart will totally redraw all the chart. If add the new data to the chart frequently, it is not tolerated. we just need to add the new data at the end of line chart smoothly. So do you know some options that I can use in this case?
$("#container").kendoStockChart({
title: {
text: "My test"
},
dateField: "D",
dataSource: {
transport: {
read:"url to get datas"
}
},
series:[{
type:"line",
field:"V"
}],
axisDefaults:
{
valueAxis: {
labels: {
template: "#=value#",
visible: true
}
}
},
navigator: {
series: {
type:"line",
field:"V"
}
}
});
var updatefunction = function () {
var kendoStockChart = $("#container").data("kendoStockChart");
var d = new Date();
kendoStockChart.dataSource.add({"D":d.getTime(),"V":1000});
setTimeout(updatefunction, 10000);
};
setTimeout(updatefunction, 10000);
I have a problem about StockChart. Our requirement is to add new data to the StockChart after I get the new data from server. the following code is just a test fragment. But the problem is in the update function when I add the new data to StockChart. the stockchart will totally redraw all the chart. If add the new data to the chart frequently, it is not tolerated. we just need to add the new data at the end of line chart smoothly. So do you know some options that I can use in this case?
$("#container").kendoStockChart({
title: {
text: "My test"
},
dateField: "D",
dataSource: {
transport: {
read:"url to get datas"
}
},
series:[{
type:"line",
field:"V"
}],
axisDefaults:
{
valueAxis: {
labels: {
template: "#=value#",
visible: true
}
}
},
navigator: {
series: {
type:"line",
field:"V"
}
}
});
var updatefunction = function () {
var kendoStockChart = $("#container").data("kendoStockChart");
var d = new Date();
kendoStockChart.dataSource.add({"D":d.getTime(),"V":1000});
setTimeout(updatefunction, 10000);
};
setTimeout(updatefunction, 10000);