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

StockChart SelectEnd event Problem

3 Answers 67 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Burak
Top achievements
Rank 2
Burak asked on 31 Mar 2014, 09:06 AM
Hello, 

I have a selector on my chart, and also one in the navigator... I wish to have an event fired after the selector of the main chart is used, but not when the navigators selector is used. When I implement 

SelectEnd: onSelectEnd,

and 

onSelectEnd= function(e) {
**code**
}

this works for both selectors... Is there a way to limit this event only for the maincharts' selector, and leave the navigator alone? Thanks! =)

3 Answers, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 01 Apr 2014, 03:43 PM
Hi,

The selectEnd event arguments contain a reference to the axis options. This is omitted in the documentation and will be addressed.

You can set a name on the axis to differentiate it:
    $("#chart").kendoStockChart({
      categoryAxis: {
        name: "main"
      },
      navigator: {
     },
      selectEnd: function(e) {
        if (e.name === "main") {
          // ...
        }
      }
    });


--- Live demo ---

As a token of gratitude for your involvement your Telerik points have been updated.

Regards,
T. Tsonev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Burak
Top achievements
Rank 2
answered on 02 Apr 2014, 05:53 AM
It works with
-> e.axis.name === "name"

just to be clear =)
thanks again!
0
T. Tsonev
Telerik team
answered on 02 Apr 2014, 12:09 PM
Hello,

Sorry for sending you the wrong code. I was definitely using e.axis at some point, but anyway.

The docs are up to date now.

Regards,
T. Tsonev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Charts
Asked by
Burak
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Burak
Top achievements
Rank 2
Share this question
or