Custom cell's colors in 3D surface

TeeChart for ActiveX, COM and ASP
Post Reply
Andy
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

Custom cell's colors in 3D surface

Post by Andy » Mon Nov 20, 2006 3:40 pm

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!

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

Post by Narcís » Mon Nov 20, 2006 4:31 pm

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.
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

Andy
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

Post by Andy » Tue Nov 21, 2006 3:41 pm

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?

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 Nov 23, 2006 11:27 am

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
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

Andy
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

Post by Andy » Fri Nov 24, 2006 7:24 am

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!

Post Reply