Hello,
Thank you for the example on Kendo-Stock chart using AngularJS.
I want to create a kendo stock chart using AngularJS which should be based upon dynamically updated data.But I am able to do with a fixed period of time only.
Can you suggest me the solution with an example?
Regards,
Adyasha
7 Answers, 1 is accepted
The StockChart will respond to changes in the underlying data source.
See this dojo demo for an example. I had to manually update the navigator range.
Will investigate if this can be fixed.
Regards,
T. Tsonev
Telerik
Hello Tsonev,
I'm not able to access the demo link. Can you paste the code in comment please.
I believe the dojo site is down.
Hello Tsonev,
Thanks for the example. But I don't want to render the chart every-time. It should append the new data into the chart series. I'm expecting the smooth render as per the example from fiddler.
In my app, I'm going to get the data for every few seconds or minutes. so I should render the chart with new data with smooth render.
Is't possible to render like that in kendo chart.
Thanks.
You can turn off transitions in the chart:
Thanks for reply. As I'm using series to bind data to kendo chart instead of data source add,remove,at methods are not working,here is the DOJO Example i tried with simple JavaScript functions,its not working.
Is there any other solution for dynamically updating data with series data binding.
Thanks
When updating series instead of a dataSource, you need to explicitly tell the chart to refresh
var
chart = $(
"#chart"
).data(
"kendoChart"
);
var
ds = chart.options.series;
kendoConsole.log(
"Before : "
+ JSON.stringify(ds[0].data));
var
index = ds[0].data.indexOf(ds[0].data[0]);
ds[0].data.splice(index, 1);
ds[0].data.push(Math.floor(Math.random()* 12));
kendoConsole.log(
"After : "
+ JSON.stringify(ds[0].data));
chart.refresh();
Updated DOJO