Adding Bar with default color values

TeeChart for ActiveX, COM and ASP
Post Reply
CarlS
Newbie
Newbie
Posts: 6
Joined: Thu Jun 02, 2005 4:00 am
Location: South Africa

Adding Bar with default color values

Post by CarlS » Fri Nov 16, 2007 12:18 pm

Hi

I have an eval copy of Teechart pro 8 active ex running on VB.net and I can't seem to add a bar to the series with the default color theme defined by the chart editor.

My code looks something like this:

Me.AxTChart1.Series(0).Add(50, "Test", System.Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Empty)))
Me.AxTChart1.SetTheme(TeeChart.EChartTheme.ctWindowsXP, TeeChart.EColorPalette.cpWindowsXP)
Me.AxTChart1.Series(0).ColorEachPoint = True

I feel like I am really missing something here ...??? :?:

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 Nov 16, 2007 12:22 pm

Hi CarlS,

You could try this:

Code: Select all

Me.AxTChart1.Series(0).Add(50, "Test", clTeeColor)
Hope this helps!
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

CarlS
Newbie
Newbie
Posts: 6
Joined: Thu Jun 02, 2005 4:00 am
Location: South Africa

Adding Bar with default color values

Post by CarlS » Fri Nov 16, 2007 1:14 pm

Hey Narcis

Thanks for the quick reply.


I did try that but my app keeps underlining the word and telling me that it's not declared.

Thanks
Carl

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 Nov 16, 2007 2:25 pm

Hi Carl,

What about using 536870912 instead? You'll find all TeeChart's constants definitions in TeeChartDefines.h at C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++.
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

Neutone
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Post by Neutone » Fri Jan 04, 2008 1:00 am

I'm getting the same problem in VB2008. Is there some file I should add to my project?

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 Jan 04, 2008 8:33 am

Hi Neutone,

I'm afraid not. If VB2008 doesn't accept TeeChart's constant definitions you'll have to use their values described at TeeChartDefines.h.
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

Post Reply