Hi
This must sound like such a simple question but I can't get it to work. I'm creating a line thus;
theLine = new Line();
theLine.Add(new Point(0, 0));
theLine.Add(new Point(1, 1));
theLine.Add(new Point(2, 2));
myChart.Series.Add(theLine);
Anyone know why my chart isn't displaying a line. Nothing is displayed.
Note I can display the line by doing this;
int[] X = {1,2,3};
int[] Y = {1,2,3};
Line line1 = new Line();
line1.Add(X,Y);
myChart.Series.Add(line1);
But I dont want to build up my line like this because I wont be able to predefine the values in an array.
Im getting the values from some hardware so I just want to keep adding points
We are using TeeChart version 3.5.3187.15585 and C#.NET
How Do I Create a Line from Points?
Re: How Do I Create a Line from Points?
Hello Dave,
To create a Line with using points you need use PointF, if you want it works as you expect. See next lines of code:
On the other hand, I recommend you taking a look in the Help References, concretly in Series->Add method where you will find, what structures of data you can use in this method.
Thanks,
To create a Line with using points you need use PointF, if you want it works as you expect. See next lines of code:
Code: Select all
line1.Add(new PointF(0, 0));
line1.Add(new PointF(1, 1));
line1.Add(new PointF(2, 2));
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: How Do I Create a Line from Points?
Thanks Sandra, that works.