Page 1 of 1

Custom cell's colors in 3D surface

Posted: Mon Nov 20, 2006 3:40 pm
by 9078468
Hellow,

I use the TeeChart with VC++. How can I draw the 3D surface, where cells have individual colors (for example : color of cell is determined by angle of normal, not from Y - value).

I supposed that it can be done as bellow code:

Code: Select all

pSurface->AddXYZ(x, y, z, _bstr_t(""), my_color);
but, it have not wishfull effect.

I rely to your help!

Posted: Mon Nov 20, 2006 4:31 pm
by narcis
Hi Andy,

It works fine for me here. Could you please send us a simple example project we can run "as-is" to reproduce your problem here?

You can post your examples at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Tue Nov 21, 2006 3:41 pm
by 9078468
narcis wrote:Hi Andy,

It works fine for me here. Could you please send us a simple example project we can run "as-is" to reproduce your problem here?

Thanks in advance.
Hi Narcis!

Yes, this method works well, but not in OpenGL mode. :( (I forget to talk this detail)

When OpenGL is active, the surface is drawing by color range (by default from white to blue), if UseColorRange is turned off the surface is coloring in single color.... Is any solution for this problem?

Posted: Thu Nov 23, 2006 11:27 am
by narcis
Hi Andy,

It works fine for me here using the latest v7.0.1.3 maintenance release, which we posted at the client area, and the code below. Can you please test if it works for you?

Code: Select all

Private Sub Command1_Click()
    TChart1.Aspect.OpenGL.Active = Not TChart1.Aspect.OpenGL.Active
End Sub

Private Sub Form_Load()
  With TChart1.Series(0).asSurface
    .AddXYZ 0, Rnd, 0, "", vbRed
    .AddXYZ 0, Rnd, 1, "", vbBlue
    .AddXYZ 0, Rnd, 2, "", vbGreen
    .AddXYZ 1, Rnd, 0, "", vbWhite
    .AddXYZ 1, Rnd, 1, "", vbYellow
    .AddXYZ 1, Rnd, 2, "", vbLime
    .AddXYZ 2, Rnd, 0, "", vbRed
    .AddXYZ 2, Rnd, 1, "", vbRed
    .AddXYZ 2, Rnd, 2, "", vbRed
    .AddXYZ 3, Rnd, 0, "", vbGray
    .AddXYZ 3, Rnd, 1, "", vbBlack
    .AddXYZ 3, Rnd, 2, "", vbRed
  End With

  TChart1.Aspect.OpenGL.Active = True
  Me.TeeCommander1.Chart = Me.TChart1
End Sub

Posted: Fri Nov 24, 2006 7:24 am
by 9078468
narcis wrote:Hi Andy,

It works fine for me here using the latest v7.0.1.3 maintenance release, which we posted at the client area, and the code below. Can you please test if it works for you?
Hi Narcis,

I download the TeeChart v7.0. It's work fine, indeed! I used version 6 earlier.

In six version (OpenGL mode) Surface series draws not correctly, but TriSurface is correctly....

Thank you!