How to add shapes to the points of a series (dynamically)
How to add shapes to the points of a series (dynamically)
I simply want to set the size, shape, and color of each point in my series. Currenlty it is setup as a fastline, and I still want to keep the line, I would just like to make the points more defined by adding a small circle for each point, and possibly change the color. I would also like to accomplsih this dynamically as everything else is setup as such. Currently I'm not having much luck tracking down how to do this in the help files.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Maxeta,
FastLine series don't have the possibility to add a pointer to them. However you can do that using a Line series:
Another option is doing something like this:
FastLine series don't have the possibility to add a pointer to them. However you can do that using a Line series:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Pointer.Visible = true;
line1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
line1.Add(5, Color.Red);
line1.Add(7, Color.Blue);
line1.Add(2, Color.Yellow);
line1.Add(7, Color.Green);
line1.Add(1, Color.Orange);
}
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Pointer.Visible = true;
line1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
line1.FillSampleValues();
line1.ColorEach = true;
line1.ColorEachLine = false;
}
Best Regards,
Narcís Calvet / 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 |
Thanks that seemed to work well, one quick question though.
With the FastLine, the scale for my Y values was auto ranged (actual point values where not listed), but with the Line it seems to actually put in exact point values (with a very long set of trailing decimal places).What is the best way to alieviate this?
* Actually, I just noticed it only happens when the points are "visible", a grid line marker of 1781.89 changes to 1788.18798507 when I change visible from "false" to "true".
With the FastLine, the scale for my Y values was auto ranged (actual point values where not listed), but with the Line it seems to actually put in exact point values (with a very long set of trailing decimal places).What is the best way to alieviate this?
* Actually, I just noticed it only happens when the points are "visible", a grid line marker of 1781.89 changes to 1788.18798507 when I change visible from "false" to "true".
Last edited by Maxeta on Thu Jun 08, 2006 1:52 pm, edited 2 times in total.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Maxeta,
Could you please send us an example we can run "as-is" or some code so that we can reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Could you please send us an example we can run "as-is" or some code so that we can reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Best Regards,
Narcís Calvet / 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 |