public void UpdateAxis() { try { const int MAX_CNT = 80; int cnt = 0; cnt = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt].Count - 1; DateTime maxDate = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt][cnt].Date; DateTime minDate0 = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt][0].Date; DateTime minDate = GetMinDate(maxDate, dictIntervalTypes[tf], MAX_CNT * dictIntervals[tf]); //Plaza2Connector.GUIBox.GUICandleBox[isin][tf][dt][first].Date; minDate = CUtilTime.MaxDate(minDate0, minDate); minAbs = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt].GetMinimumFromDate(minDate); maxAbs = m_plaza2Connector.GUIBox.GUICandleBox[m_isin][tf][dt].GetMaximumFromDate(minDate); CreateOrUpdateAxis(); System.Windows.Controls.DataVisualization.Charting.DateTimeAxis axis_X = ((System.Windows.Controls.DataVisualization.Charting.DateTimeAxis)Chart.SeriesHost.Axes[0]); CorrectMinMax(dictIntervalTypes[tf], dictIntervals [tf], ref minDate, ref maxDate); axis_X.Minimum = minDate; axis_X.Maximum = maxDate; axis_X.IntervalType = dictIntervalTypes[tf]; axis_X.Interval = dictIntervals[tf]; } catch (Exception e) { m_plaza2Connector.Alarmer.Error("UpdateAxis", e); } }