Jump to content
Software FX Community

x axis labels on stacked bar chart


Recommended Posts

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

Link to comment
Share on other sites

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


Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...