Hi Tuyen,
As I am not sure of your programming language, I will use Java/C# as an example.
You may try something like:
//your existing addMainChart line
XYChart myMainPriceChart = c.addMainChart(........);
LegendBox b = myMainPriceChart.getLegend();
b.setAlignment(Chart.TopRight);
PlotArea p = myMainPriceChart.getPlotArea();
b.setPos(p.getLeftX() + p.getWidth(), p.getTopY());
Hope this can help.
Regards
Peter Kwan |