Hi,
Is there a way to place the Legend below the chart? I have already tried the X and Y properties of the Legend like this:
chart.Legends[0].X = 0f;
chart.Legends[0].Y = 150f;
chart.Legends[0].Visible = true;
But setting the X and Y values to different values does not seem to change anything where the Legend appears in the chart.
(Plus to which point do this X and Y values refer?)
And is there a way to display the "entries" of the legend side by side rather than below each other?
Thanks in Advance,
Thomas
Placing Legend below Chart
Re: Placing Legend below Chart
Support · Aug 6, 2013Hello Thomas,
Yes, you can add the legends horizontally below the X-Axis of the chart without any problem using our DynamicPDF Generator for .NET product. You will need to use the Layout, Placement and LabelsLayout properties of the Legend class to do this. Below is the sample code for it.
chart.Legends.Layout = LayOut.Horizontal;
chart.Legends.Placement = LegendPlacement.BottomCenter;
chart.Legends.LabelsLayout = LayOut.Horizontal;
Thanks,
ceTe Software Support Team.
Re: Placing Legend below Chart
Forum member · Aug 6, 2013Wow that was fast.
Thanks Alot, works just as it should.