Hi Alexander,
You need to modify the panel location - the following code shows how to revert to the location before you started to drag the panel:
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
nChartControl1.Controller.Selection.SelectedObjects.Add(chart);
NOffsetTool tool = new NOffsetTool();
tool.BeginDrag += new EventHandler(tool_BeginDrag);
nChartControl1.Controller.Tools.Add(tool);
....
Stack<NPointL> m_LocationStack = new Stack<NPointL>();
void tool_BeginDrag(object sender, EventArgs e)
{
m_LocationStack.Push(nChartControl1.Charts[0].Location);
}
private void button1_Click(object sender, EventArgs e)
{
if (m_LocationStack.Count > 0)
{
nChartControl1.Charts[0].Location = m_LocationStack.Pop();
nChartControl1.Refresh();
}
}
Best Regards,
Nevron Support Team