Page 1 of 1

Fixed bar series

Posted: Sat Sep 10, 2005 7:14 pm
by 9525099
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.

Posted: Mon Sep 12, 2005 10:46 am
by narcis
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.

Posted: Fri Sep 16, 2005 6:37 pm
by 9525099
Narcis, do you have sample code on how I would have fixed series and a databound series to the recordset. Thanks.

Posted: Mon Sep 19, 2005 7:56 am
by narcis
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.

Posted: Wed Mar 01, 2006 6:49 pm
by 9525099
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: