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

[Solved] StockChart - Negative values -> Category Axis label

3 Answers 182 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Franck
Top achievements
Rank 1
Franck asked on 17 Dec 2014, 01:02 PM
Hello,

A have issues to successfully set the categoryAxis Labels to the bottom of the stockChart in case of Negative Values.
As recommended on other posts on the issue, I set 2 categoryAxis and I set axisCrossingValue: [0, -1000000000] .
I only succeed with some tricks to make it work with a Navigator :
http://dojo.telerik.com/OgarE/3

But if I remove the Navigator ;
It's not working anymore :
http://dojo.telerik.com/OgarE/4

It's not working either with a vertical stockChart... : 
http://dojo.telerik.com/OgarE/5

As I don't bind the data to the datasource attribute, (the data are in the series attributes), I can't catch the dataBound event (the event is not fired) to set the category axis labels padding to 0... So I can't resolve the issue this way...

Please, can you provide a solution which will work in every possible configuration ? 



3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 19 Dec 2014, 02:04 PM
Hi,

The stock chart will generally not function well with the navigator hidden. It also doesn't support vertical series.

As for positioning the labels at the bottom, the two-axis trick will only work if the chart is bound to a data source.
Otherwise, the second axis will be just empty. The categories must be populated with the dates manually in this case.

An alternative is to use a padding, but this is tied to specific chart size.

Can you please elaborate on what the final result should be? Is there a reason to use the stock chart without the navigator?
We'll appreciate any additional info.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Franck
Top achievements
Rank 1
answered on 29 Dec 2014, 08:46 AM
Hi,

For the final result, we would like that the labels of the category axis stay outside of the chart in case of negative values. On the bottom for a horizontal chart, or on the left side for Vertical Chart. 
We're developping a back end interface to allow a user to setup a chart with severals parameters (series type, sources, navigator, size, etc...).
So it was more easy for us to render the chart by assuming it's always a stock chart. 
But as your answer implied, may be we will have to use KendoChart by default, and the stockChart only if we have a navigator.

We will try this lead then. Thank you for your answer.
0
T. Tsonev
Telerik team
answered on 30 Dec 2014, 01:51 PM
Hi,

Thanks for clarifying. Let us know if we can help with anything else.

Happy holidays!

Regards,
T. Tsonev
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
Franck
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Franck
Top achievements
Rank 1
Share this question
or