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

Pie RadChartView: context menu is not showing

1 Answer 101 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mathias
Top achievements
Rank 1
Mathias asked on 17 Oct 2013, 04:54 PM
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

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Oct 2013, 02:01 PM
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 >>
Tags
ChartView
Asked by
Mathias
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or