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

Determine actual calculated baseUnit when set to 'fit'?

4 Answers 89 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Raido Valgeväli
Top achievements
Rank 2
Raido Valgeväli asked on 15 May 2013, 09:18 AM
How-to question in the title.
Thanks.
 Raido

4 Answers, 1 is accepted

Sort by
0
Raido Valgeväli
Top achievements
Rank 2
answered on 15 May 2013, 09:27 AM
Supplementing  the question: hot to determine actual value in case baseUnit is not set in configuration?
0
Accepted
T. Tsonev
Telerik team
answered on 16 May 2013, 03:06 PM
Hi,

The actually chosen values are accessible through the live axis instance:

var chart = $("#chart").data("kendoChart");
var axis = chart._plotArea.categoryAxis;

var baseUnit = axis.options.baseUnit;
var baseUnitStep = axis.options.baseUnitStep;

Note that properties with underline are considered "private", i.e. subject to change. This includes the axis implementation as well.

That said, these in particular are pretty safe to use.

Greetings,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ben
Top achievements
Rank 1
answered on 14 Jan 2021, 08:22 PM
Does this code still work this way?  Has plot area made it into the stable codebase instead of private?  If so, can it be added to the documentation?
0
Ben
Top achievements
Rank 1
answered on 14 Jan 2021, 09:29 PM

Answered my own question with the example here:

http://dojo.telerik.com/OkONAtEM/56

 

_plotArea has been renamed to plotArea and is no longer private.  plotArea.categoryAxis seems to not be documented yet though.

 

 

Tags
Charts
Asked by
Raido Valgeväli
Top achievements
Rank 2
Answers by
Raido Valgeväli
Top achievements
Rank 2
T. Tsonev
Telerik team
Ben
Top achievements
Rank 1
Share this question
or