Issue with DragMarks tool

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Sugan
Newbie
Newbie
Posts: 18
Joined: Tue Oct 23, 2012 12:00 am

Issue with DragMarks tool

Post by Sugan » Wed Jan 02, 2013 5:16 am

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 6995 times
After Zoom:
tt2.png
After Zoom
tt2.png (48.88 KiB) Viewed 6990 times
Please let me know how this issue can be fixed.

Thanks,
Sugan
Regards,
Sugan

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Issue with DragMarks tool

Post by Sandra » Wed Jan 02, 2013 4:50 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Sugan
Newbie
Newbie
Posts: 18
Joined: Tue Oct 23, 2012 12:00 am

Re: Issue with DragMarks tool

Post by Sugan » Thu Jan 03, 2013 11:34 am

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
Regards,
Sugan

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Issue with DragMarks tool

Post by Sandra » Thu Jan 03, 2013 1:20 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Sugan
Newbie
Newbie
Posts: 18
Joined: Tue Oct 23, 2012 12:00 am

Re: Issue with DragMarks tool

Post by Sugan » Tue Jan 08, 2013 9:35 am

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
Regards,
Sugan

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Issue with DragMarks tool

Post by Sandra » Tue Jan 08, 2013 5:19 pm

Hello Sugan,

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

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply