Setting X-Y Values and Coloring individual points in a point

TeeChart for ActiveX, COM and ASP
Post Reply
John P. Francis
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: San Diego, Ca.

Setting X-Y Values and Coloring individual points in a point

Post by John P. Francis » Thu Mar 29, 2007 12:12 am

I think I've asked this question before, but cannot find the answer on how to re-color a point in a point series and how to move the point to a new x-y value location.

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 29, 2007 9:33 am

Hi John P. Francis,

You can try doing something like this:

Code: Select all

Private Sub Command1_Click()
    TChart1.Series(0).XValues.Value(5) = 3.5
    TChart1.Series(0).YValues.Value(5) = 7.5
    TChart1.Series(0).PointColor(5) = RGB(0, 255, 0)
End Sub

Private Sub Form_Load()
    TChart1.Series(0).XValues.Order = loNone
    TChart1.Series(0).ColorEachPoint = True
    
    For i = 0 To 10
        TChart1.Series(0).Add i, "", RGB(255, 0, 0)
    Next
End Sub
Also remember that for changing points values there's DragPoint tool as well.
Best Regards,
Narcís Calvet / 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

John P. Francis
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: San Diego, Ca.

What you mean for us C++ weenies is:

Post by John P. Francis » Thu Mar 29, 2007 4:47 pm

m_Chart.Series( series_index ).GetXValues().SetValue( point_index, double_value);

John P. Francis
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: San Diego, Ca.

But I'm not sure of Color each in C++?

Post by John P. Francis » Thu Mar 29, 2007 5:05 pm

There doesn't seem to be a function like:

m_Chart.Series( series_index ).GetPointColor().SetColor( RGB(0,255,0));
:shock:

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 30, 2007 7:19 am

Hi John,

What about using this?

Code: Select all

	m_Chart.Series( series_index ).SetPointColor( point_index, RGB(0,255,0));
Best Regards,
Narcís Calvet / 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

John P. Francis
Newbie
Newbie
Posts: 15
Joined: Mon Jun 26, 2006 12:00 am
Location: San Diego, Ca.

Thanks for the C++ version

Post by John P. Francis » Fri Mar 30, 2007 3:12 pm

That works just fine, thanks john

Post Reply