Page 1 of 1
How to add shapes to the points of a series (dynamically)
Posted: Wed Jun 07, 2006 5:32 pm
by 9090970
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.
Posted: Thu Jun 08, 2006 8:00 am
by narcis
Hi Maxeta,
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);
}
Another option is doing something like this:
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;
}
Posted: Thu Jun 08, 2006 1:33 pm
by 9090970
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".
Posted: Thu Jun 08, 2006 1:37 pm
by narcis
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.
Posted: Thu Jun 08, 2006 1:54 pm
by 9090970
Actually I was able to fix it by setting the value format of the label (I never had to do this before though).