Page 1 of 1

Stack Bar Graph

Posted: Fri May 02, 2008 3:23 pm
by 15048423
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.

Posted: Mon May 05, 2008 9:17 am
by yeray
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.