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

Configuring Axis Selection in Kendo Chart

1 Answer 249 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 25 Oct 2016, 07:39 AM

I'm implementing a Kendo bar chart representing power usage for 24 hours of a day. I'm following the demo from here.( http://demos.telerik.com/kendo-ui/chart-api/selection ). Assuming the hour axis(x-axis) has 24 points and 24 data values, the start point being 12am and end point 12am next day (or 11:59:59pm same day), how to get value of the 25th axis point. The way chart represents data is, 24 bars placed between 25 axis points. In the above demo,if you select first single unit in x-axis it console logs `Select end :: 0 - 1 (1952 - 1952), Select start :: 0 - 1 (1952 - 1952)` , which is little confusing, How can start and end value be same? In my case, it is working fine till 24th axis point, but once i select 24th bar, the 25th axis point(the end point) logs out undefined. How to get around this? Any suggestions?

 

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 27 Oct 2016, 06:53 AM
Hi Eric,

In the selectEnd event you could reach the axis categories as well as the selection range. Hence you could use custom JavaScript and display the actual selection range for each category except the last one. For the 25th axis point you could for example display only the from value. Take a look at the following dojo which demonstrates a possible implementation:

http://dojo.telerik.com/@Iliana/oxAde

Regards,
Iliana Nikolova
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Charts
Asked by
Eric
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or