Hi Steema support,
We are facing one problem regarding the legend position on Chart. We are using the Dot Net TChart version 2012.
The problem is that we set the legend position on the chart and then close the chart again we open same chart the legend doesn't show at previous position.
We set the legend position on Resize and GetLegendPos events. In these events we write the below code is as follows:-
double px = XLegendLocation;
double py = YLegendLocation;
if (this.Series.Count > 0)
{
px = this.Series[0].ValuePointToScreenPoint(px, 0).X;
py = this.Series[0].ValuePointToScreenPoint(0, py).Y;
}
this.Legend.Top = Convert.ToInt32(py);
this.Legend.Left = Convert.ToInt32(px);
But when we click on chart the legend position is set to the previous location.
We don't know whether it is a refreshing issue or some other problem. Kindly guide us.
Thanks & regards
Plano research
Legend Custom Position
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Legend Custom Position
Yes, I think that the legend needs to repositioned at every chart repaint and not just when the chart is resized. You can use one of the repaint events shown in this example:amol wrote: We don't know whether it is a refreshing issue or some other problem. Kindly guide us.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |