Pie RadChartView: context menu is not showing

2 posts, 0 answers
  1. Mathias
    Mathias avatar
    4 posts
    Member since:
    Apr 2013

    Posted 17 Oct 2013 Link to this post

    Hello,

    I am currently using the ChartView context menus to copy the graph to the clipboard. It works fine for all my ChartViews except those of type Pie. In fact, the default context menu (with only the "Palette" item) is not even showing.

    Is it a known bug or am I missing something?
    Best,
    Mathias
  2. Dess
    Admin
    Dess avatar
    1607 posts

    Posted 22 Oct 2013 Link to this post

    Hello Mathias,

    Thank you for contacting Telerik Support.

    The current chart mechanism applies Palette to given series (LineSeries, BarSeries, etc.). This palette determines all data points color, belonging to the certain series. That is why in this case you can see the context menu displayed and change the palette color. As to the PieSeries, you have only one series and all PieDataPoints belong to it. But due to the specific nature of Pie chart, each pie piece should have different color. That is why you are not allowed to customize the Palette. If your requirement is to show context menu for pie chart, you should subscribe to the MouseDown event and display your context menu:
    this.radChartView1.MouseDown+=radChartView1_MouseDown;
     
    private void radChartView1_MouseDown(object sender, MouseEventArgs e)
    {
        if (e.Button== System.Windows.Forms.MouseButtons.Right)
        {
            ContextMenu menu = new ContextMenu();
            menu.MenuItems.Add(new MenuItem("item 1"));
            menu.Show(radChartView1, e.Location);
        }
    }

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top