ChartRenderer.cs
namespace KLATencor.Charts
{
public abstract class ChartRenderer : IDisposable
{
public abstract ChartBase Chart
{
get;
set;
}
public ChartControlBase ChartControl
{
get { return this.Chart.MyControl; }
}
public abstract void Dispose();
}
}
SurfaceChartLegendRenderer.cs
public class SurfaceChartLegendRenderer : SurfaceChartRenderer, IChartClipboardable
{
this.ChartControl.MouseDown += new MouseEventHandler(ChartControl_MouseDown);
void ChartControl_MouseDown(object sender, MouseEventArgs e)
{
NHitTestResult hitTestResult = this.ChartControl.HitTest(e.X, e.Y);
if (e.Button == MouseButtons.Right &&
hitTestResult.Legend == this.Legend)
{
....// context menu for legend (Auto Scale/ Set Scale).
}
}
}
hi,
i am using above code to add the "Context Menu" to the Legend
it throwing exception in line NHitTestResult hitTestResult = this.ChartControl.HitTest(e.X, e.Y);
its working fine panel size is small ,
but i when expand the panel it could recognized the whether its legend/ chart
can you help in resolving the problem