Stack Bar Graph

TeeChart for ActiveX, COM and ASP
Post Reply
DJ200
Newbie
Newbie
Posts: 39
Joined: Thu Feb 28, 2008 12:00 am

Stack Bar Graph

Post by DJ200 » Fri May 02, 2008 3:23 pm

Sorry, I am rather new to exotic graphing. I want to use TeeChart Pro 8 ActiveX to plot a stack bar. I have a table which contains Reagents and Results. I want to group the results and present them with the bottom axis showing result, the left axis showing count, and the bar stacking the reagents within that result group. I am using SQL Server 2005, and the query does all of the grouping and counting. I can't find any examples of how to set up the Stack Bar in the TeeChart documentation, so I am rather confused. Also, how would I add series at run time, as I wouldn't know in advance how many result groups there would be.
Any help would be greatfully received.
Core 2 Quad
3gb Ram
Windows XP-Pro Sp3
Visual Basic 6 SP6
SQL Server 2005
Active Reports 2 Std
TeeChart Pro 8

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon May 05, 2008 9:17 am

Hi DJ200,

You can add series to your chart simply doing something like this:

Code: Select all

TChart1.AddSeries scBar
And to set the bars as stacked:

Code: Select all

TChart1.Series(1).asBar.MultiBar = mbStacked
From here, I recommend you to take a look at the demos that come with teechart installation. Concretely you may be interested in All Features/Chart Styles/Standard/Bar.

Note that you should find the Features Demo at Teechart programs group, in start menu.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply