Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
463
Ultra chart
posted

Is it possible to identify that in which chart element (chart series, Chart Plot area, chart Grid Lines , etc ) the user has right clicked?

I want to give excel like facility to user for changing the property of chart element at right click.

Please help me ……

Thanks

Dilip

 

Parents
No Data
Reply
  • 28496
    Suggested Answer
    Offline posted

    i think it is possible through some hacking.  you can use the ChartDataClicked event to be raised by manipulating the Caps, Chart, Layer, Row, and Column properties of every primitive in the chart's SceneGraph.

            void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
            {
                UltraChart theChart = (UltraChart)sender;
                foreach (Primitive p in e.SceneGraph)
                {
                    p.Caps |= PCaps.HitTest | PCaps.Tooltip;
                    p.Chart = e.ChartCore.ChartType;
                    p.Layer = e.ChartCore.GetChartLayer();
                    if (p.Row == -1)
                    {
                        p.Row = 0;
                    }
                    if (p.Column == -1)
                    {
                        p.Column = 0;
                    }
                }
            }

            private void ultraChart1_ChartDataClicked(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e)
            {
                MessageBox.Show(e.Primitive.GetType().Name);
            }

Children
No Data