Cecilia Daniels Posted November 19, 2009 Report Share Posted November 19, 2009 Hello -- I have a chart with several series rendered as a Stacked Bar on the Y Axis. In addition I have 1 or more series rendered as line(s) on the Y2 axis. I am unable to make the line(s) appear in front of the stacked bar. Note: When the Yaxis is a Bar, I can use .sendtoback or .bringtofront on the individual series items to make the line appear in the front. But when I change to stackedbar it does not appear to have an effect. Any ideas. I took the additionalaxes sample app. and modified to illustrate the problem. I can post it if it would help. Thanks, Cecilia Daniels Quote Link to comment Share on other sites More sharing options...
CarlosAC Posted November 20, 2009 Report Share Posted November 20, 2009 Hi Cecilia Daniels I found a workaround for your issue. It will only work if the latest series is the one with Lines gallery type. List<SeriesAttributes> allSeries = new List<SeriesAttributes>();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> //Adds all series (in current order) to the auxiliar Collection foreach (SeriesAttributes series in chart1.Series) { allSeries.Add(series); } //Iterate from all series and invert the current order foreach (SeriesAttributes series in allSeries) { series.BringToFront(); } I hope it helps. -- Pipon Quote Link to comment Share on other sites More sharing options...
Cecilia Daniels Posted December 1, 2009 Author Report Share Posted December 1, 2009 Pipon - I do not think your work around is going to work for me. My application allows for more than one line on the chart. The stacked bar is associated with the Y Axis and the Lines are associated with the Y2 Axis. We currently use series.sendtoback to move the stacked bar items to the back so we can group lines and bars together on the legend. The Y2 items are now show at the beginning of the legend. The lack of control over the positioning of items on the chart coupled with the lack of control over the order items appear in the legend seems to be a significant weakness in ChartFX. Do you know it ChartFX is aware of this weakness and if there is any hope of them fixing it? Thank you, Cecilia Daniels 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.