Click event on each section of the pie portion

13 posts, 0 answers
  1. Jingying Wu
    Jingying Wu avatar
    22 posts
    Member since:
    Jul 2009

    Posted 16 Jul 2009 Link to this post

    Is there a way to hook a mouse click event to a portion of the pie?

    We would like to see the pie, click on a slice of the pie and click to a detailed report of the pie.
    ie. the pie shows 20%, and we can click on the slice to see the details of the 20%.

    thanks in advance
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 16 Jul 2009 Link to this post

    Hi Jingying Wu,

    You can handle the ChartItemClick event exposed by the ChartArea object (RadChart.DefaultView.ChartArea) and process the click action as appropriate for each respective slice.


    Sincerely yours,
    Manuel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Jingying Wu
    Jingying Wu avatar
    22 posts
    Member since:
    Jul 2009

    Posted 16 Jul 2009 Link to this post

    How do i find out which slice of the pie was click?
    The ItemClick event seems to be for the entire pie.

    My pie has say 20% Pass, 40% Fail,40% unknown.
    We want to be able to click on Pass, and show pass results in the grid.
    I need to know the click happen on which slice.
  5. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 17 Jul 2009 Link to this post

    Hi Jingying Wu,

    You can extract the necessary information like this:

    public Page() 
        InitializeComponent(); 
     
        RadChart1.DefaultSeriesDefinition = new PieSeriesDefinition(); 
        RadChart1.DefaultView.ChartArea.ChartItemClick += new EventHandler<ChartItemClickEventArgs>(ChartArea_ChartItemClick); 
     
    void ChartArea_ChartItemClick(object sender, ChartItemClickEventArgs e) 
        // extract the information for each respective slice from: 
        // e.DataPoint -- the DataPoint associated with the clicked slice 
        // e.ItemIndex & e.DataSeries -- the index of the clikced slice in the respective DataSeries 
        // ... 


    Note that if you are using RadControls version prior to Q1 2009 SP1, you will need to upgrade to the latest version of the controls due to a resolved issue with wrong ItemIndex in ChartItemClickEventArgs for radial series.


    Kind regards,
    Manuel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Zeeshan
    Zeeshan avatar
    12 posts
    Member since:
    Dec 2010

    Posted 23 May 2011 Link to this post

    <telerik:RadChart x:Name="Via3DPieChart" Background="{x:Null}" >
                    <telerik:RadChart.DefaultSeriesDefinition>
    <telerik:Pie3DSeriesDefinition/>
                </telerik:RadChart.DefaultSeriesDefinition>
    <telerik:RadChart.DefaultView>
    <telerik:ChartDefaultView>
    <telerik:ChartDefaultView.ChartArea>
    <telerik:ChartArea
    ToolTipService.ToolTip
    ="{Binding OptionText}"
    LegendName
    ="chartLegend" ItemClick="ChartArea_ItemClick"/>
    </telerik:ChartDefaultView.ChartArea>
    </telerik:ChartDefaultView>
    </telerik:RadChart.DefaultView>
                         
            </telerik:RadChart>
     

    void
     ChartArea_ItemClick(object sender, ChartItemClickEventArgs e)
    {
                MessageBox.Show("HELLO");
               
    } Hi , This event is not firing.Can you tell me the reason
  7. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 26 May 2011 Link to this post

    Hi Mohd,

    Interactivity effects (click, selection, hover) are supported for 2D series only so if you need to handle the ItemClick event for the pie slice in your scenario, you will need to use the 2D pie series instead of Pie3D.


    Greetings,
    Giuseppe
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  8. Nidhi
    Nidhi avatar
    19 posts
    Member since:
    Jun 2011

    Posted 07 Jun 2011 Link to this post

    Hi

    I am also facing the same issue. Instead of using chart area item click event. I want the use commands bcoz using MVVM. I found from Jan 2011. Command property is introduced. But didn't find any sample code for that...

    Can you please provide us a sample code.

    Thanks,
    Nidhi
  9. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 08 Jun 2011 Link to this post

    Hello Nidhi,

    You can review the code from the Chart first look example here http://demos.telerik.com/silverlight/#Chart/FirstLook -- the bar chart uses commanding.


    Greetings,
    Bart.
  10. Joshua
    Joshua avatar
    22 posts
    Member since:
    Sep 2010

    Posted 09 Sep 2014 in reply to Bartholomeo Rocca Link to this post

    Hey guys,

        Just wanted to find out if the click event on a slice of Pie portion in 3D chart (silverlight) working ????

       Please let me know 

       Thanks.
  11. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 12 Sep 2014 Link to this post

    Hello,

    Interactivity effects (click, selection, hover) are supported for 2D series only. In general we have found that the 3D effect does not bring additional value to data visualization and does not help to perceive the values any better. I suggest you do not use the old RadChart and do not use 3D series, but use the new ChartView control, which is much faster, very easy to set up and is very flexible.

    Regards,
    Petar Marchev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  12. Joshua
    Joshua avatar
    22 posts
    Member since:
    Sep 2010

    Posted 13 Nov 2014 Link to this post

    Excellent Answer !!!!!!!!

    So what you are saying is World will go forward and you guys will be stuck in 1945...Come on guys you need to come visit future...
    Hopefully your new Boss "Progress software" does a better job. 

    Thanks for your help.
  13. Joshua
    Joshua avatar
    22 posts
    Member since:
    Sep 2010

    Posted 13 Nov 2014 Link to this post

    Excellent Answer !!!!!!!!

    So what you are saying is World will go forward and you guys will be stuck in 1945...Come on guys you need to come visit future...

    Thanks for your help.
  14. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 17 Nov 2014 Link to this post

    Hello Joshua,

    I am really sorry to hear about your frustration. I hope I can shed some light on the situation and thus ensure you that we are actually going forward.

    A while ago we took a step back and re-evaluated the needs of our customers and how our charting solution (RadChart) measured up those needs. The decision that we came upon was not an easy one - most customers would have us work on the performance and flexibility of RadChart and the control had its limitations. Nevertheless, we stood by our decision and the result was a new control - RadChartView. You can find a detailed comparison between the two controls in our online documentation. And indeed, we put the focus of this new control on performance, flexibility and ease of use and now, almost 3 years later, we are still focusing on these three points when developing RadChartView.

    As our new charting solution developed and reached a certain set of features, we decided the put all our development efforts in RadChartView and plan only critical bugs for RadChart. As a result, we have not released new features for RadChart for some time now.

    Now, regarding RadChartView and its missing support for 3D series - to be completely honest with you, 3D series support is not one of our major priorities, when developing our new charting solution. Its current priority is low compared to other feature requests for the control. The reason for this is that it brings no value into the data visualization element, it is not easier to compare values and to perceive data. I understand that some of our customers like 3D visualization better, but our current focus is on the missing data visualization features of RadChartView.

    Regards,
    Tsvetie
    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.

     
Back to Top
DevCraft banner