Jump to content
Software FX Community
Z95

LegendBox swap between the color and the text

Recommended Posts

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

Share this post


Link to post
Share on other sites

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;

 

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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");

Share this post


Link to post
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.

Guest
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.

Loading...

×
×
  • Create New...