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

How to get x-axis and y-axis co-ordinate values

3 Answers 137 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 19 Mar 2012, 01:48 PM
Hi Telerik team,

 We have a requirement to add comments in the chart to elaborate on data points. so how to get x-axis and y-axis co-ordinate values  onSeriesClick event.
 
 Is it possiable to add text dynamically to chart on particular datapoint ..?  

Thanks,
Rajesh

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 21 Mar 2012, 09:48 AM
Hello,

The Chart does not provide such built-in functionality, but you can overlay it with absolutely positioned HTML elements. 

function onSeriesClick(e) {
    var offset = e.element.offset();

    $("<div/>")
        .html("Some text")
        .css({
            "position": "absolute",
            "top": offset.top,
            "left": offset.left
         })
        .appendTo(document.body);
}


I hope this helps.

Regards,
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
Rajesh
Top achievements
Rank 1
answered on 22 Mar 2012, 06:21 AM
Hi Tsvetomir Tsonev ,
 
    Thanks for reply.

     The code what you have shared working fine. If i am using same code in onDataBound Event getting error.

     Is it possiable to use same code in onDataBound Event.


Thanks,
Rajesh
0
T. Tsonev
Telerik team
answered on 22 Mar 2012, 09:18 AM
Hello,

No, the individual points are not accessible before the click event. This is an issue that we look forward to address in future versions.

Apologies for the caused inconvenience.

Kind regards,
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!
Tags
Charts
Asked by
Rajesh
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Rajesh
Top achievements
Rank 1
Share this question
or