Jump to content
Software FX Community

How to move legend box to bottom left?


samiam1029

Recommended Posts

 Hi,

The Chart FX  legend box can be aligned to the left and vertically set it to the bottom of the chart. However the space between the elements of the legend box cannot be modified, this is a limitation.

This code shows how to set the mentioned properties:


chart1.Data.Series = 1;
  chart1.Data.Points = 3;
  chart1.Data[0, 0] = 30;
  chart1.Data[0, 1] = 50;
  chart1.Data[0, 2] = 20;
  chart1.Data.Labels[0] = "Very long Chart FX Legend 1";
  chart1.Data.Labels[1] = "Very long Chart FX Legend 2";
  chart1.Data.Labels[2] = "Very long Chart FX Legend 3";
  chart1.Gallery = ChartFX.WinForms.Gallery.Pie;

  chart1.LegendBox.Dock = ChartFX.WinForms.DockArea.Bottom;
  chart1.LegendBox.ContentLayout = ChartFX.WinForms.ContentLayout.Near;

post-2354-13922412856157_thumb.gif

Link to comment
Share on other sites

This still does not work though.

(1) I did ContentLayout.Near and attached here is the image. The legends moved slightly to the left (up to the vertical axis) but what I need is for them to move "far left" i.e. all the way to the left margin. Please look at my original images above.

(2) There is still that gap I don't want.

 Just FYI, I produced all these charts using ChartFX. The legends I want to see were done by the older COM version of ChartFX. Are you sure there is absolutely no way to achieve this in the new .NET version of ChartFX?

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.

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.

×
×
  • Create New...