Drilldown chart: how to get non-charted data

2 posts, 0 answers
  1. Tomica
    Tomica avatar
    147 posts
    Member since:
    Apr 2008

    Posted 01 Oct 2015 Link to this post

        With RadGrid I frequently use a SQL data source which returns data columns with "display=false" so that I can use a value for inclusion in a templated column. Typically this is for purposes of building a hyperlink with a client-friendly display value, but with a database code for the querystring.

     "<a href='whatever.aspx?id=category_code>category_name</a>

    When using HTML Pie Chart, I know how to retrieve the values of "DataFieldY" and "Name_Field".

    The "NameField" is my "category_name" but when clicked, I really want "category_code", i.e. a value known to the underlying data source but not displayed on the chart itself.

    Any suggestions on a potential solution?

    Note that I could do I reverse lookup back into the database, but there are cases where we trim long  "Name_Field" values to avoid messing up chart presentation.

  2. Marin Bratanov
    Marin Bratanov avatar
    5922 posts

    Posted 02 Oct 2015 Link to this post


    You can use the OnSeriesClick event to get the dataItem from the clicked item: http://docs.telerik.com/KENDO-UI/api/javascript/dataviz/ui/chart#events-seriesClick (see the e.dataItem array).

    Here is a basic example:

    <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server">
        <ClientEvents OnSeriesClick="alertData" />
                <telerik:BarSeries DataFieldY="someField">
        function alertData(e) {


    Marin Bratanov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top