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:
After Zoom:
Please let me know how this issue can be fixed.
Thanks,
Sugan
Issue with DragMarks tool
Issue with DragMarks tool
Regards,
Sugan
Sugan
Re: Issue with DragMarks tool
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.
Could you tell us if previous code works in your end?
I hope will helps.
Thanks,
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;
}
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 |
Instructions - How to post in this forum |
Re: Issue with DragMarks tool
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
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
Sugan
Re: Issue with DragMarks tool
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,
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 |
Instructions - How to post in this forum |
Re: Issue with DragMarks tool
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
Regards,
Sugan
Sugan
Re: Issue with DragMarks tool
Hello Sugan,
Thanks for your information. I have added it in bug.
Thanks,
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 |
Instructions - How to post in this forum |