Beispiel #1
0
        protected override void Invoke(object parameter)
        {
            if (parameter is RoutedEventArgs)
            {
                CheckBox targetBox = (parameter as RoutedEventArgs).OriginalSource as CheckBox;
                if (targetBox != null && targetBox.IsChecked != null)
                {
                    switch (targetBox.Name)
                    {
                    case "checkExplodeAll":
                        foreach (ChartSeries series in this.Target.olapChart1.Series)
                        {
                            ChartPieType.SetExplodedAll(series, targetBox.IsChecked.Value);
                        }
                        if ((bool)targetBox.IsChecked)
                        {
                            this.Target.comboExplodeIndex.IsEnabled = false;
                            this.Target.txtExplodeIndex.IsEnabled   = false;
                        }
                        else
                        {
                            this.Target.comboExplodeIndex.IsEnabled = true;
                            this.Target.txtExplodeIndex.IsEnabled   = true;
                        }
                        break;

                    case "checkEnableEffects":
                        foreach (ChartSeries series in this.Target.olapChart1.Series)
                        {
                            series.EnableEffects = targetBox.IsChecked.Value;
                        }
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        private static void SetSerieType(ChartSeries UIChartSeries, IChartSerie XlsIOChartSerie)
        {
            switch (XlsIOChartSerie.SerieType)
            {
            case ExcelChartType.Column_Clustered_3D:
                UIChartSeries.Type = ChartTypes.Column;
                break;

            case ExcelChartType.Column_Clustered:
                UIChartSeries.Type = ChartTypes.Column;
                break;

            case ExcelChartType.Column_Stacked:
                UIChartSeries.Type = ChartTypes.StackingColumn;
                break;

            case ExcelChartType.Column_Stacked_100:
                UIChartSeries.Type = ChartTypes.StackingColumn100;
                break;

            case ExcelChartType.Line:
                UIChartSeries.Type = ChartTypes.Line;
                break;

            case ExcelChartType.Line_Markers:
                UIChartSeries.Type          = ChartTypes.Line;
                UIChartSeries.EnableEffects = true;
                break;

            case ExcelChartType.Pie:
                UIChartSeries.Type = ChartTypes.Pie;
                break;

            case ExcelChartType.Pie_Exploded:
                UIChartSeries.Type = ChartTypes.Pie;
                ChartPieType.SetExplodedAll(UIChartSeries, true);
                break;

            case ExcelChartType.Bar_Clustered:
                UIChartSeries.Type = ChartTypes.Bar;
                break;

            case ExcelChartType.Bar_Stacked:
                UIChartSeries.Type = ChartTypes.StackingBar;
                break;

            case ExcelChartType.Bar_Stacked_100:
                UIChartSeries.Type = ChartTypes.StackingBar100;
                break;

            case ExcelChartType.Area:
                UIChartSeries.Type = ChartTypes.Area;
                break;

            case ExcelChartType.Area_Stacked:
                UIChartSeries.Type = ChartTypes.StackingArea;
                break;

            case ExcelChartType.Scatter_Line:
            case ExcelChartType.Scatter_Markers:
            case ExcelChartType.Scatter_Line_Markers:
            case ExcelChartType.Scatter_SmoothedLine:
            case ExcelChartType.Scatter_SmoothedLine_Markers:
                UIChartSeries.Type = ChartTypes.Scatter;
                break;

            case ExcelChartType.Stock_HighLowClose:
                UIChartSeries.Type = ChartTypes.HiLo;    //4
                break;

            case ExcelChartType.Stock_OpenHighLowClose:
                UIChartSeries.Type = ChartTypes.HiLoOpenClose;    //4
                break;

            case ExcelChartType.Stock_VolumeHighLowClose:
                UIChartSeries.Type = ChartTypes.Candle;    //4
                break;

            case ExcelChartType.Doughnut:
                UIChartSeries.Type = ChartTypes.Doughnut;
                break;

            case ExcelChartType.Doughnut_Exploded:
                UIChartSeries.Type = ChartTypes.Doughnut;
                ChartPieType.SetExplodedAll(UIChartSeries, true);
                break;

            case ExcelChartType.Bubble:
                UIChartSeries.Type = ChartTypes.Bubble;    //2
                break;

            case ExcelChartType.Radar:
                UIChartSeries.Type = ChartTypes.Radar;
                break;

            case ExcelChartType.Pie_3D:
                UIChartSeries.Type = ChartTypes.Pie;
                break;

            default:
                return;
            }
        }