samiam1029 Posted October 22, 2009 Report Share Posted October 22, 2009 I have a 2 series data charted with Gannt. I need to show legends and right now they appear below the chart, at the CENTER, use two lines separated by SOME SPACE. What I need to do is move the legends to the LEFT and leave NO SPACE between the legend lines. I'd appreciate your help on this. Thanks. Quote Link to comment Share on other sites More sharing options...
samiam1029 Posted October 23, 2009 Author Report Share Posted October 23, 2009 The top chart shows my current legend boxes. The bottom chart shows what I'd like the legend boxes to look like. Quote Link to comment Share on other sites More sharing options...
juanZ Posted October 23, 2009 Report Share Posted October 23, 2009 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; Quote Link to comment Share on other sites More sharing options...
samiam1029 Posted October 23, 2009 Author Report Share Posted October 23, 2009 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? Quote Link to comment Share on other sites More sharing options...
juanZ Posted October 26, 2009 Report Share Posted October 26, 2009 Hi Sam, I apologize for the inconvenient, but there is no way to move that legend more to the left than the way it is handled by the content layout. ChartFX.WinForms.ContentLayout.Near This i a chart limitation. Juan Z. Quote Link to comment Share on other sites More sharing options...
samiam1029 Posted October 27, 2009 Author Report Share Posted October 27, 2009 Ok but why? Is there a reason to deliberately take something that was working so well in older version and just yank it out in the newer version? Or is it just an oversight and this will be supported in near future? Thanks. 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.