private void cbChartType_SelectedIndexChanged(object sender, RoutedEventArgs e)
 {
     if (cbChartType.SelectedIndex < 0)
     {
         return;
     }
     chartControl.Diagram = ChartFactory.GenerateDiagram((Type)((ComboBoxEditItem)cbChartType.SelectedItem).Tag, ceShowPointsLabels.IsChecked);
     pivotGridControl.ChartProvideEmptyCells = IsProvideEmptyCells();
 }
        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var screenWidth  = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
            var screenHeight = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;

            SizeToContent = SizeToContent.Manual;
            Width         = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
            Height        = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;

            var windowWidth  = Width;
            var windowHeight = Height;

            Left = (screenWidth - windowWidth) / 2;
            Top  = (screenHeight - windowHeight) / 2;

            ChartFactory.InitComboBox(cbChartType, null);
        }