Fixed bar series

TeeChart for ActiveX, COM and ASP
Post Reply
jetgeek
Newbie
Newbie
Posts: 13
Joined: Thu Dec 02, 2004 5:00 am

Fixed bar series

Post by jetgeek » Sat Sep 10, 2005 7:14 pm

Is there anyway to create a fixed bar series based on a stacked bar chart. What I would like to accomplish is for the first bar to always display the same set of fixed values: 23, 54, 23. The remaining datavalues would then be graphed based on the values within the recordset that are set in the XValues.ValueSource property. as in the following:

.Series(i - 1).XValues.ValueSource = m_rsFiltered.Fields(0).Name

Also, I would like to keep this static series to display ermanently based on the maximum number of bars displayed per page. As in the following:

TChart1.Page.MaxPointsPerPage = 5

So when the user pages through the available bars the first fixed status series always displays in comparison to the other bars.

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 Sep 12, 2005 10:46 am

Hi JW,

You could try using 2 series. One for the fix values and the other for the recordset values. With the "fix values" series you could add the same bars every number of points you want to be on each page.
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

jetgeek
Newbie
Newbie
Posts: 13
Joined: Thu Dec 02, 2004 5:00 am

Post by jetgeek » Fri Sep 16, 2005 6:37 pm

Narcis, do you have sample code on how I would have fixed series and a databound series to the recordset. Thanks.

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 Sep 19, 2005 7:56 am

Hi JW,

For the "fixed series" you could use AddXY method and an X values at every MaxPointsPerPage interval. Regarding the recordset series, you'll find examples at "Tutorial 8 - ADO Database access". You'll find the tutorials at the TeeChart program group.
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

jetgeek
Newbie
Newbie
Posts: 13
Joined: Thu Dec 02, 2004 5:00 am

Post by jetgeek » Wed Mar 01, 2006 6:49 pm

Narcís,

Here is what we did to get the "null" points inside a series using recordsets:
(1) Created separate routines to create the NORM recordset which the columns matched the needed recordset of actual data (testid numbers).
(2) Then we made points w/i the recordset norm at .5 intervals, so that if the actual data was 1,4,5,6,8, etc., then the norms were .5,3.5,4.5,5.5,7.5, etc. This allows the NORM bars to be intertwined between each bar, then we delete or just omit every 4th, so that the recordset ends up like this: .5,7.5,etc.
(3) Union Join the two recordsets together (two qrys actually) and sort by the testid. Then the dataset looks like this: .5,4,5,6,7.5,8, etc.

Thanks for the coding ideas as it helped with other issues we had w/ different data points.
:wink:

Post Reply