/// <summary>
 /// Creates a new chart.
 /// </summary>
 void CreateChart()
 {
     if (TabControlBase.SelectedTab != TabPageChart) return;
     ChartData chartData = GetChartDataObject();
     _chart = new Chart(chartData) {Parent = TabPageChart, Dock = DockStyle.Fill};
     _chart.InitChart(chartData);
 }
        /// <summary>
        /// Creates a new chart.
        /// </summary>
        void CreateChart()
        {
            if (tabControlBase.SelectedTab == tabPageChart)
            {
                Chart_Data chartData = GetChartDataObject();
                chart = new Chart(chartData);
                chart.Parent = tabPageChart;
                chart.Dock   = DockStyle.Fill;
                chart.InitChart(chartData);
            }

            return;
        }