Hi Richard,
The following code configures the layout so that both the chart and the legend are centered vertically and at fixed offset from the sides of the control:
NChart chart = nChartControl1.Charts[0];
NLegend legend = nChartControl1.Legends[0];
// at fixed distance from the left side (20pt), but centered relative to height
chart.ContentAlignment = ContentAlignment.MiddleRight;
chart.Location = new NPointL(new NLength(20), new NLength(50, NRelativeUnit.ParentPercentage));
// 50% of the height of the chart control and 80
chart.Size = new NSizeL(new NLength(80, NRelativeUnit.ParentPercentage), new NLength(50, NRelativeUnit.ParentPercentage));
// at fixed distance from the right side (20pt) centered relative to height
legend.ContentAlignment = ContentAlignment.MiddleLeft;
legend.Location = new NPointL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(50, NRelativeUnit.ParentPercentage));
legend.Margins = new NMarginsL(new NLength(0), new NLength(0), new NLength(20), new NLength(0));
We hope this helps - let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team