Page 1 of 1

ClickAxis in WPF

Posted: Wed Aug 03, 2011 12:33 pm
by 15659642
Hi,

Is it possible to use the ClickAxis event on a chart (Line and CircularGauge) in WPF?
If yes, can you provide me an exemple?

Thanks,
Antoine.

Re: ClickAxis in WPF

Posted: Wed Aug 03, 2011 1:18 pm
by 15659642
I've managed to do it with the Line using this:

Code: Select all

this.tc_Chart.ClickAxis +=new MouseEventHandler(tc_Chart_ClickAxis);

//...

private void tc_Chart_ClickAxis(object sender, MouseEventArgs e)
        {
            Console.WriteLine(e.ToString());
        }
but it does not work with the CircularGauge.

Re: ClickAxis in WPF

Posted: Thu Aug 04, 2011 9:51 am
by 10050769
Hello Antonie,

I am afraid that it is not possible use ClickAxies in CircularGauge, so Axis of CircularGauge is not visible, therefore no accessible and do ClicAxis Event, loses meaning when you use CircularGauge.

Thanks,

Re: ClickAxis in WPF

Posted: Thu Aug 04, 2011 1:31 pm
by 15659642
Ok. To by-pass this limitation I have tried to used the ClickSeries of the TChart component and the Click of the CircularGauge without any success.

Code: Select all

        public void InitTeeChart()
        {
            CircularGauge gauge = new CircularGauge();

            gauge.Click +=new MouseEventHandler(gauge_Click);

            tc_Chart.ClickSeries+=new TChart.SeriesEventHandler(tc_Chart_ClickSeries);

            this.tc_Chart.Series.Clear();
            this.tc_Chart.Series.Add(gauge);

        }

        private void tc_Chart_ClickSeries(Object sender, Series s, Int32 valueIndex, MouseEventArgs e)
        {
            Console.WriteLine("tc_Chart_ClickSeries: " +e.ToString());
        }

        private void gauge_Click(object sender, MouseEventArgs e)
        {
            Console.WriteLine("gauge_Click: " + e.ToString());
        }
Which type of Event should I use to achieve my goal?

Thanks.

Re: ClickAxis in WPF

Posted: Fri Aug 05, 2011 12:00 pm
by 10050769
Hello antoine,

You are right. I have added your request in bug list report with number [TF02015685]. We will try to fix it in next maintenance releases of TeeChart.Net.

Thanks,