Page 1 of 1

Issue with DragMarks tool

Posted: Wed Jan 02, 2013 5:16 am
by 15663745
Hi,

The DragMarks tool in TeeChart behaves wrongly when the chart is zoomed or panned. The connector line looks misplaced after zooming or panning the chart. This doesn't happen is the marks are not dragged.

Here is the screenshots of the same,
Before Zoom:
tt1.png
Before Zoom
tt1.png (51.41 KiB) Viewed 6986 times
After Zoom:
tt2.png
After Zoom
tt2.png (48.88 KiB) Viewed 6981 times
Please let me know how this issue can be fixed.

Thanks,
Sugan

Re: Issue with DragMarks tool

Posted: Wed Jan 02, 2013 4:50 pm
by 10050769
Hello Sugan

I have made a simple code where I have fixed the drawline with a initial values, so when we do zoom the drawline tool doesn't modify his position.

Code: Select all

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Points Series1;
        Steema.TeeChart.Tools.DrawLine drawLine1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Series1 = new Points(tChart1.Chart);
            drawLine1 = new DrawLine(tChart1.Chart);
            Random rnd = new Random();
            DateTime dt = DateTime.Today;
            Series1.XValues.DateTime = true;
            for (int i = 0; i < 10; i  )
            {
                Series1.Add(dt, rnd.Next(100));
                dt = dt.AddHours(2); 
            }
            tChart1.Axes.Bottom.Labels.DateTimeFormat = "hh:mm";
			/* set the "X" line positions (start and end position) */
			Steema.TeeChart.Tools.DrawLineItem I = new Steema.TeeChart.Tools.DrawLineItem(drawLine1);
           /* set the "Y" line positions (start and end position) */
            tChart1.Draw();
			double tmp = Series1.YValues.Range/5.0;
            double x = Series1.ScreenPointToValuePoint(Series1.CalcXPos(2), Series1.CalcYPos(2)).X;
            double x1 = Series1.ScreenPointToValuePoint(Series1.CalcXPos(4), Series1.CalcYPos(4)).X;
            I.StartPos = new Steema.TeeChart.Drawing.PointDouble(x,Series1.YValues[2]);
            I.EndPos = new Steema.TeeChart.Drawing.PointDouble(x1,Series1.YValues[4]);
            drawLine1.EnableDraw = false;
			drawLine1.Pen.Color = Color.Blue;
            drawLine1.Pen.Width = 4;
		}
Could you tell us if previous code works in your end?

I hope will helps.

Thanks,

Re: Issue with DragMarks tool

Posted: Thu Jan 03, 2013 11:34 am
by 15663745
Hi Sandra,

My issue is not with the DrawLine tool. I have issue with the DragMarks tool. I don't find the code you have given useful to me in anyway.
What I'm looking for is, after dragging a series mark, if I zoom, the mark should move along with the point. But that is not happening. I believe this is a bug and needs to be fixed. i.e., currently dragging the series marks sets position of the mark to absolute value, instead it should actually be a relative value. And when the chart is zoomed or panned, the marks should be repositioned according to the current pointer position.

Could you please help me out in this regard ?

Regards,
Sugan

Re: Issue with DragMarks tool

Posted: Thu Jan 03, 2013 1:20 pm
by 10050769
Hello Sugan,

Sorry. I didn't understand your problem correctly, I have added your request in bug list report with number [TF02016470]. We will try to fix it to upcoming versions of TeeChartFor.Net.

Thanks,

Re: Issue with DragMarks tool

Posted: Tue Jan 08, 2013 9:35 am
by 15663745
Thanks Sandra. To add to this, I noticed that this problem occurs even when the chart is resized. Please address that as well.

Regards,
Sugan

Re: Issue with DragMarks tool

Posted: Tue Jan 08, 2013 5:19 pm
by 10050769
Hello Sugan,

Thanks for your information. I have added it in bug.

Thanks,