jstasz Posted September 23, 2008 Report Share Posted September 23, 2008 I am creating a stacked bar chart (vertical bars), using a cross tab data provider.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> I am charting number of shipments per day, by truck or by rail. The x axis is the date and the y axis it the number of shipments. The chart itself is fine but the x axis labels are behaving Quote Link to comment Share on other sites More sharing options...
jstasz Posted September 23, 2008 Author Report Share Posted September 23, 2008 Quote Link to comment Share on other sites More sharing options...
Frank Posted September 23, 2008 Report Share Posted September 23, 2008 Set: crosstabProvider.RowHeadingSettings = RowHeadingSettings.CompressedXValues; Quote Link to comment Share on other sites More sharing options...
jstasz Posted September 24, 2008 Author Report Share Posted September 24, 2008 Thanks, that worked I have another related question. Is there anyway to assign a color to the series. I have tried the chart.series.item(0).color, but this doesn't do exactaly what I need. It appears that ChartFx assigns the first color to which ever series/column data it finds first. We have two companies at our site. So I am producing two charts. I would like to make sure that "truck" is always blue and "rail" is always red. With the charts on the same page it is deceiving when one has mostly red bars and the other mostly blue, yet both mean truck shipments! Is there any way to tie the color to the data in the series and not just the series.item? Thanks again Joyce Quote Link to comment Share on other sites More sharing options...
jstasz Posted September 24, 2008 Author Report Share Posted September 24, 2008 I guess I spoke too soon. The CrossTabProvider.RowHeadingSettings = RowHeadingSettings.CompressedXValues shifts all the values to the left. The labels came out ok on the x axis, but the stacked bars actually contain data from "two dates". The series are compressed independantly. So the first stacked bar contains the first day of Rail shipments stacked on Top the first day of truck shipments, even though they are not for the same calendar day! I think I have figured out the "color" issue. I am checking the chart.series.item(0).text and setting the colors accordingly. This appears to work so far. Joyce Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.