HI Neveron Team,
I made a little change to Aligning Chart Areas(All Examples -> Layout -> Aligning Chart Areas) to make it refresh its data constantly.
The changed code is as below:
private void NewDataBtn_Click(object sender, System.EventArgs e)
{
if (timer != null)
timer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
timer = new System.Threading.Timer(new System.Threading.TimerCallback(RefreshData), null, 0, 100);
}
private void RefreshData(object sender)
{
GenerateOHLCData(m_Stock, prevCloseValue, dataPointCount);
GenerateVolumeData(m_Volume, prevVolumeValue, dataPointCount);
m_Line.Values = m_Function.Calculate();
nChartControl1.Refresh();
}
After running for a while, I found the UI counn't display properly(as UI1.JPG).
can you tell me why this happens and how to prevent it?
Thank you very much.