Page 1 of 1

ClickSeries does not fire correctly in HArea

Posted: Thu Apr 26, 2007 9:39 pm
by 9643227
Seems to me that the ClickSeries event does not fire correctly in HArea series - the event does not fire at all when the user click on the area region. It fires only when the user click on the "top" area region (View3D = true) or on the area line (View3D = false).

Jeff

Posted: Fri Apr 27, 2007 2:09 pm
by 9348258
Hi Jeff

Thanks for letting this know, we could reproduce the issue here and this seems to be a bug. We've added it (TF02012191) to our defect list to be fixed for future releases.

Similar problem with line series

Posted: Wed May 21, 2008 10:41 am
by 13048239
Hi Edu,

I am faced with a very similar problem. I'm using line style (DashDotDot) for my series with visible pointers. The TChart.ClickSeries event doesn't always fire when clicking on the line only. When I click on a pointer it fires but this is not sufficient because it could be that no pointer lies in the current visible area.

Thanks
Michael

Posted: Wed May 21, 2008 12:23 pm
by narcis
Hi Michael,

I'm not able to reproduce the issue here using code below with latest TeeChart for .NET v3 maintenance release.

Could you please modify it so that we can reproduce the problem here and let us know the exact steps we should follow and TeeChart version you are using?

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}
				
		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;

			line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

			line1.FillSampleValues();
			line1.Pointer.Visible = true;
			line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.DashDotDot;
			line1.LinePen.Width = 3;

			tChart1.ClickSeries += new TChart.SeriesEventHandler(tChart1_ClickSeries);
		}
		
		private Steema.TeeChart.Styles.Line line1;

		void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
		{
			tChart1.Header.Text = line1.Clicked(e.X, e.Y).ToString();
		}
Thanks in advance.

Posted: Wed May 21, 2008 1:49 pm
by 13048239
Hi NarcĂ­s,

first of all thanks for your quick reply!

Here is the code:

Code: Select all

public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line1.Add(new DateTime(2008, 1, 1), 0);
            line1.Add(new DateTime(2008, 12, 31), 100);
            line1.Pointer.Visible = true;
            line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.DashDotDot;
            line1.LinePen.Width = 3;
            tChart1.ClickSeries+=new TChart.SeriesEventHandler(tChart1_ClickSeries);
            tChart1.Axes.Bottom.Minimum = DateTime.Now.ToOADate();
            tChart1.Axes.Bottom.Maximum = DateTime.Now.AddHours(24).ToOADate();
        }

        private Steema.TeeChart.Styles.Line line1;

        void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
        {
            tChart1.Header.Text = line1.Clicked(e.X, e.Y).ToString();
        }
The adjustment of the min/max properties of the bottom axis does not work somehow but you can just zoom in so that the pointers of the line are outside the visible area.

The TeeChart Version we use is: TeeChart.Net 3.2.2945.19737.

Michael

Posted: Wed May 21, 2008 2:02 pm
by narcis
Hi Michael,

Thanks for the information. I could reproduce the issue here and added it (TF02013061) to the defect list to be fixed for future releases.

Axes min. and max. settings were not working as you should use commented code below or SetMinMax as being used in the example:

Code: Select all

		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;

			line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
			line1.Add(new DateTime(2008, 1, 1), 0);
			line1.Add(new DateTime(2008, 12, 31), 100);
			line1.Pointer.Visible = true;
			//line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.DashDotDot;
			line1.LinePen.Width = 3;
			tChart1.ClickSeries += new TChart.SeriesEventHandler(tChart1_ClickSeries);
			
			tChart1.Axes.Bottom.SetMinMax(DateTime.Now.ToOADate(), DateTime.Now.AddHours(24).ToOADate());
			
			//tChart1.Axes.Bottom.AutomaticMinimum = false;
			//tChart1.Axes.Bottom.Minimum = DateTime.Now.ToOADate();
			//tChart1.Axes.Bottom.AutomaticMaximum = false;
			//tChart1.Axes.Bottom.Maximum = DateTime.Now.AddHours(24).ToOADate();
		}
BTW: Also please notice there's a much newer release available at the client download area.