Page 1 of 1
Setting X-Y Values and Coloring individual points in a point
Posted: Thu Mar 29, 2007 12:12 am
by 9531682
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
Posted: Thu Mar 29, 2007 9:33 am
by narcis
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.
What you mean for us C++ weenies is:
Posted: Thu Mar 29, 2007 4:47 pm
by 9531682
m_Chart.Series( series_index ).GetXValues().SetValue( point_index, double_value);
But I'm not sure of Color each in C++?
Posted: Thu Mar 29, 2007 5:05 pm
by 9531682
There doesn't seem to be a function like:
m_Chart.Series( series_index ).GetPointColor().SetColor( RGB(0,255,0));
Posted: Fri Mar 30, 2007 7:19 am
by narcis
Hi John,
What about using this?
Code: Select all
m_Chart.Series( series_index ).SetPointColor( point_index, RGB(0,255,0));
Thanks for the C++ version
Posted: Fri Mar 30, 2007 3:12 pm
by 9531682
That works just fine, thanks john