Z95 Posted September 16, 2013 Report Share Posted September 16, 2013 Hi, I would like to swap between the location of text and the color in the legend box. For example, my legend looks like: [Graph] Value1 [Graph continue] Value2 And I would like to have [Graph] Value1 [Graph continue] Value2 Is it possible? Thanks Z Quote Link to comment Share on other sites More sharing options...
AndreG Posted September 16, 2013 Report Share Posted September 16, 2013 Hello Z, The default chart has the series icon to the left of the text, as you have indicated as your preference (screenshot below). Do you mean it the other way around? If so, try the code below: chart1.LegendBox.Style = LegendBoxStyles.RightAlign; Quote Link to comment Share on other sites More sharing options...
Z95 Posted September 18, 2013 Author Report Share Posted September 18, 2013 Hi AndreG, Thanks for your answer.. and you understand me correct. After changing the legand box style to the one you mentioned the icon is still on the right. Is there any other suggestions? maybe some other property that prevent from the style to changed? Thanks! Z Quote Link to comment Share on other sites More sharing options...
AndreG Posted September 18, 2013 Report Share Posted September 18, 2013 I believe some cultures will force the chart to be displayed that way. Can you try changing the culture of your chart? chart1.LegendBox.Style = LegendBoxStyles.Default; Thread.CurrentThread.CurrentUICulture = new CultureInfo("en"); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Quote Link to comment Share on other sites More sharing options...
Z95 Posted September 19, 2013 Author Report Share Posted September 19, 2013 That's work!! You are a genius Thanks a lot!!! Z 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.