I have a problem with stacked bars and missing values.
My data is a set of tables resulting from a database query.
Each table has two columns (Week and Amount)
For each table I create a bar series with the MutliBar property set to Stacked, the table is the DataSource and DataMember for XValues and YValues are "Week" and "Amount" resp. BarWidthPercent is set to 100.
The problem is that not every table has rows for each week. The result is that the bar width is pretty variable. A bar for - let's say - week 12 in a series where all other weeks are missing extends horizontally until it hits another bar.
Does anyone have a solution other than creating a lot of null values manually?
Daniel
Problem with stacked bars
Hi, Daniel.
In this case the solution is to manually populate each series with data and use "null" points for missing data. By "manually" I mean cycling through all points in dataset and using Add method to add points to series. I'd first make a list of all available "weeks" and then compare each record week value with this list. If there is a match, use regular Add method, otherwise add null point to series by using Add(xval,0,Color.Empty); methodThe problem is that not every table has rows for each week.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com