Hi Hans,
1) How do I locate the legend to the far right so isn't located on top of the chart, hiding the chart below the legend?
The best way to do it is to use panel docking (see the code below). You can also change the Location / ContentAlignement of the legend in order to position it on the right - you can take a look at the following example:
All Examples \ Panels \ Legend
The following code shows how to create an automatic dock layout:
nChartControl1.Panels.Clear();
NLabel label = new NLabel("Header");
label.Margins = new NMarginsL(10);
label.DockMode = PanelDockMode.Top;
nChartControl1.Panels.Add(label);
NLegend legend = new NLegend();
legend.Margins = new NMarginsL(10);
nChartControl1.Panels.Add(legend);
legend.DockMode = PanelDockMode.Right;
NCartesianChart chart = new NCartesianChart();
chart.Margins = new NMarginsL(10);
nChartControl1.Panels.Add(chart);
chart.DisplayOnLegend = legend;
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);
bar.Legend.Mode = SeriesLegendMode.DataPoints;
bar.Legend.Format = "<value>";
bar.Values.ValueFormatter = new NNumericValueFormatter(".0");
chart.BoundsMode = BoundsMode.Stretch;
chart.DockMode = PanelDockMode.Fill;
2) How do I control the formatting of the text inside the legend? also, the number of digits after the punctuation mark (for instance, 100,0 instead of 99.99)?
You need to modify the scale value formatting:
NNumericScaleConfigurator paletteScale = paletteCellData.PaletteScaleConfigurator as NNumericScaleConfigurator;
paletteScale.LabelValueFormatter = new NNumericValueFormatter(".0");
3) How do i control it so that only one column of numbers is shown in the legend?
Probably this is related to staggered labels - to turn this feature off you can use:
paletteScale.LabelFitModes = new LabelFitMode[] { LabelFitMode.AutoScale };
You can also post a screenshot to illustrate the problem.
Hope this helps - let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team