Page 1 of 1

Adding Bar with default color values

Posted: Fri Nov 16, 2007 12:18 pm
by 9527066
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 ...??? :?:

Posted: Fri Nov 16, 2007 12:22 pm
by narcis
Hi CarlS,

You could try this:

Code: Select all

Me.AxTChart1.Series(0).Add(50, "Test", clTeeColor)
Hope this helps!

Adding Bar with default color values

Posted: Fri Nov 16, 2007 1:14 pm
by 9527066
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

Posted: Fri Nov 16, 2007 2:25 pm
by narcis
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++.

Posted: Fri Jan 04, 2008 1:00 am
by 9078696
I'm getting the same problem in VB2008. Is there some file I should add to my project?

Posted: Fri Jan 04, 2008 8:33 am
by narcis
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.