This is a migrated thread and some comments may be shown as answers.

Stack Chart change datasource series type from candleStick to bar / line

2 Answers 129 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Dragos
Top achievements
Rank 1
Dragos asked on 06 Jan 2016, 09:28 AM

Hello , 

Can anyone point me in some direction on how i may be able to  change the dataSource series types from candlestick to line or bar or area, or anything else than candlestick.

Thank you in advance.

2 Answers, 1 is accepted

Sort by
0
Dragos
Top achievements
Rank 1
answered on 06 Jan 2016, 09:43 AM

Just to be more precise i am talking about this example http://demos.telerik.com/kendo-ui/financial/index.

And yes i have searched the documentation found here http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/stock-chart. But i can't change the type only to "ohlc", and that is not what i want to do.

0
Iliana Dyankova
Telerik team
answered on 08 Jan 2016, 09:46 AM
Hello Dragos,

Changing the StockChart series is not supported out-of-the-box, however as a workaround I would suggest using the chart.options and redrawing the chart:
// get reference to the chart widget
var chart =$("#stock-chart").data("kendoStockChart");
// change the first series type
chart.options.series[0].type="column";
// change the first series field
chart.options.series[0].field="Open";
// redraw the chart
chart.redraw();
Keep in mind candlestick series expect Open, Close, High and Low fields, while bar / area expect only field.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Dragos
Top achievements
Rank 1
Answers by
Dragos
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or