OnClientSeriesClicked/OnSeriesClicked

5 posts, 1 answers
  1. Frank
    Frank avatar
    22 posts
    Member since:
    Jun 2017

    Posted 12 Dec 2017 Link to this post

    I'm reading that OnClientSeriesClicked is obsolete and that I'm supposed to using OnSeriesClicked instead.  I'm on the newest telerik 2017 Q3 and the file under the /bin folder is dated Sept of 2017.  But when I'm in the aspx page, why it only have OnClientSeriesClicked and NOT OnSeriesClicked? Am I doing something wrong or missing something?

     

    Thx.

  2. Answer
    Peter Milchev
    Admin
    Peter Milchev avatar
    409 posts

    Posted 13 Dec 2017 Link to this post

    Hello Frank,

    The OnSeriesClick and OnSeriesHover events are in the ClientEvents section: 

    <telerik:RadHtmlChart runat="server">
        <ClientEvents OnSeriesClick="OnSeriesClick" OnSeriesHover="OnSeriesHover" />
    </telerik:RadHtmlChart>


    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Frank
    Frank avatar
    22 posts
    Member since:
    Jun 2017

    Posted 13 Dec 2017 in reply to Peter Milchev Link to this post

    Ok, thank you very much for that, one more question, I'm trying to databind the pie chart to the sqldatasource, but it seems there are issues (or I'm not doing it right) with DataFieldY.  The sqldatasource will return 2 column of data as follow:

    Description     cnt
    7 Days            3
    30 Days        37
    Rest              42
    24 Hour         116

     

    Where the "Description" column I assign to "NameField" and "cnt" column I assign to DataFieldY.  Below is my code for the chart.

                                <telerik:RadHtmlChart runat="server" ID="chartRouters" Width="100%" Height="100%" Transitions="true" 
                                    Skin="Silk" DataSourceID="sqlDSModem">
                                    <ChartTitle Text="Router Status">
                                        <Appearance Align="Center" Position="Top">
                                            <TextStyle Color="White" />
                                        </Appearance>
                                    </ChartTitle>
                                    <Legend>
                                        <Appearance Position="Right" Visible="true">
                                        </Appearance>
                                    </Legend>
                                    <PlotArea>
                                        <Series>
                                            <telerik:PieSeries StartAngle="90" DataFieldY="Cnt" NameField="Description">
                                                <LabelsAppearance Position="OutsideEnd" DataFormatString="{0} %">
                                                </LabelsAppearance>
                                                <TooltipsAppearance Color="White" DataFormatString="{0} %"></TooltipsAppearance>
                                            </telerik:PieSeries>
                                        </Series>
                                    </PlotArea>
                                </telerik:RadHtmlChart>   

     

    when I run the code, my pie chart looked "weird" and had only 4 lines (not the chart line, but lines extending out from a single point) Looks almost lilke it is not reading the "value" of the data.  

     

    When I go to the immediate window and do the :

     

    ?chartRouters.PlotArea.Series(0).DataFieldY(0), it gave me value of "c" and then 1 is "n" and 2 is "t".  I was expecting to see the actual value when I do that, but it almost like is putting the column field name in the value instead of actual data value?  That is weird.

     

    What is wrong?

     

    thank you!

     

     

  4. Frank
    Frank avatar
    22 posts
    Member since:
    Jun 2017

    Posted 13 Dec 2017 in reply to Frank Link to this post

    Sorry I'm going to start a new thread, probably a better idea.  Thank you for the information on the prior post though.
  5. Frank
    Frank avatar
    22 posts
    Member since:
    Jun 2017

    Posted 13 Dec 2017 in reply to Frank Link to this post

    Sorry I'm going to start a new thread, probably a better idea.  Thank you for the information on the prior post though.
Back to Top