Page 1 of 1

Legend box position

Posted: Wed Nov 15, 2017 12:54 pm
by CLON
Hi,

I'm using lightning chart for a wpf application with a very simple use case where i want to display a single bar serie.
The displaying of the data is fine but i'm concerned about the position of the legend box. I want it to be displayed outside the chart area, at the right of the chart.

I've tried several options of the LegendBoxXY position object (RightCenter, for example) but it displays the legend inside the chart area... Is there a way to display the legend near the chart ?

Regards,

Clément

Re: Legend box position

Posted: Wed Nov 15, 2017 1:43 pm
by ArctionKestutis
Hi Clément,

Yes, there is the way to get LegendBox on margins. Please enable AutoSpaceLegendBoxes and set desired position

Code: Select all

            _chart.ViewXY.AutoSpaceLegendBoxes = true;
            _chart.ViewXY.LegendBoxes[0].Position = LegendBoxPositionXY.RightCenter;
and Bar's example may look like this
BarsAutoSpaceLegendBoxes.jpg
BarsAutoSpaceLegendBoxes.jpg (229.29 KiB) Viewed 5963 times
All the best.

Re: Legend box position

Posted: Wed Nov 15, 2017 1:58 pm
by CLON
Works perfectly, thanks for the quick answer.

Clément