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

Multiple value axis to cross categoryAxis at 0 with negative values.

1 Answer 254 Views
Charts
This is a migrated thread and some comments may be shown as answers.
indian
Top achievements
Rank 1
indian asked on 26 Jul 2018, 08:59 AM

Hey,

first of all here's a Dojo showing the situation:

https://dojo.telerik.com/aPaqUZOX/2

I have two valueAxes and two series, each bound to another valueAxis. As long as all values in the series are positive all works as expected, but as soon as a single value goes negative it suddenly looks really weird. The reson for that is that both valueAxis' crossthe categoryAxis at different values. mpg corsses at 0 (which is fine) but l100km crosses at -8 which is not what I'd expect.

I looked through the API and found a really promising option for the valueAxes which was "axisCrossingValue". But as you can see in the Dojo I either misunderstood this option or it just isn't working in this example.

How can I get both valueAxes to cross the categoryAxis at 0?

Best wishes

indian

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 30 Jul 2018, 08:03 AM
Hello,

The axisCrossingValue is indeed the property to use but if you want the two series to start from the same base, then you need to set the axisCrossingValue  property of the series with negative values to a negative number smaller than the minimum possible values of the series, so that the series bars are drawn starting from the bottom of the Chart:
https://dojo.telerik.com/aPaqUZOX/3

Is this the look that you want to achieve?

Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Charts
Asked by
indian
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or