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

CategoryAxis - Label Position Padding based on 0 Axis

2 Answers 166 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Neal
Top achievements
Rank 1
Neal asked on 09 Mar 2017, 11:03 PM

Hello,

I'm using the Kendo Charts with a category axis to provide additional labels to our charts. I'm attempting to push the labels to the top of the graph using the padding attribute on the labels and that's working fine when the chart starts at 0.

However, once the chart goes into negative values this offset is no longer working. It appears that the padding is being applied at the position of the 0 line rather than the base of the chart. 

Is there a way to calculate or determine where that 0 axis line is located to adjust the offset appropriately?

 

Example Dojo

 http://dojo.telerik.com/Alele/2

Thanks

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 13 Mar 2017, 09:00 AM
Hi Neal,

In order to keep categoryAxis labels always on top (no matter what series values are) I would suggest the following approach: 
- Define two category axes and hide the first one;
- Set valueAxis.axisCrossingValue [0, Infinity].
I updated the example to illustrated the above approach in action - please check it and let me know if this fits the current requirements.

Regards,
Iliana Nikolova
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Neal
Top achievements
Rank 1
answered on 13 Mar 2017, 02:00 PM
Worked perfectly. Thank you for the help.
Tags
Charts
Asked by
Neal
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Neal
Top achievements
Rank 1
Share this question
or