Example #1
0
        //------------------------------------------------------
        private void AppliqueParametresArea(CChartArea f, ChartArea ms)
        {
            Applique3DStyle(f.Area3DStyle, ms.Area3DStyle);
            AppliqueAxe(f.PrimaryXAxis, ms.AxisX);
            AppliqueAxe(f.PrimaryYAxis, ms.AxisY);
            AppliqueAxe(f.SecondaryXAxis, ms.AxisX2);
            AppliqueAxe(f.SecondaryYAxis, ms.AxisY2);
            CChartAreaStyle sf = f.AreaStyle;

            ms.BackColor         = sf.BackColor;
            ms.BackGradientStyle = CConvertisseurChartEnumToMSEnum.GetMSGradientStyle(sf.BackGradientStyle);
            ms.BackHatchStyle    = CConvertisseurChartEnumToMSEnum.GetMSChartHatchStyle(sf.HatchStyle);
            //ms.BackImage = sf.BackImage;
            ms.BackImageAlignment        = CConvertisseurChartEnumToMSEnum.GetMSChartImageAlignmentStyle(sf.BackImageAlignment);
            ms.BackImageTransparentColor = sf.BackImageTransparentColor;
            ms.BackImageWrapMode         = CConvertisseurChartEnumToMSEnum.GetMSChartImageWrapMode(sf.BackImageWrapMode);
            ms.BackSecondaryColor        = sf.BackSecondaryColor;
            ms.BorderColor     = sf.BorderColor;
            ms.BorderDashStyle = CConvertisseurChartEnumToMSEnum.GetMSChartDashStyle(sf.BorderDashStyle);
            ms.BorderWidth     = sf.BorderWidth;
            AppliqueCursor(f.CursorX, ms.CursorX);
            AppliqueCursor(f.CursorY, ms.CursorY);
            AppliquePosition(f.Position, ms.Position);
            ms.ShadowColor          = sf.ShadowColor;
            ms.ShadowOffset         = sf.ShadowOffset;
            ms.Name                 = f.AreaId;
            ms.AlignmentOrientation = CConvertisseurChartEnumToMSEnum.GetMSAreaAlignmentOrientations(f.AlignmentOrientation);
            ms.AlignmentStyle       = CConvertisseurChartEnumToMSEnum.GetMSAreaAlignmentStyles(f.AlignmentStyle);
            if (f.AlignmentArea != null && f.AlignmentArea.Length > 0 &&
                f.AlignmentArea != f.AreaId)
            {
                ms.AlignWithChartArea = f.AlignmentArea;
            }
        }
Example #2
0
        //------------------------------------------------------
        private void AppliqueLegend(CLegendArea f, Legend ms)
        {
            ms.Alignment = CConvertisseurChartEnumToMSEnum.GetMSStringAlignment(f.Alignment);
            CChartLegendStyle sf = f.LegendStyle;

            ms.AutoFitMinFontSize = sf.AutoFitMinFontSize;
            ms.BackColor          = sf.BackColor;
            ms.BackGradientStyle  = CConvertisseurChartEnumToMSEnum.GetMSGradientStyle(sf.BackGradientStyle);
            ms.BackHatchStyle     = CConvertisseurChartEnumToMSEnum.GetMSChartHatchStyle(sf.HatchStyle);
            //ms.BackImage = sf.BackImage;
            ms.BackImageAlignment        = CConvertisseurChartEnumToMSEnum.GetMSChartImageAlignmentStyle(sf.BackImageAlignment);
            ms.BackImageTransparentColor = sf.BackImageTransparentColor;
            ms.BackImageWrapMode         = CConvertisseurChartEnumToMSEnum.GetMSChartImageWrapMode(sf.BackImageWrapMode);
            ms.BackSecondaryColor        = sf.BackSecondaryColor;
            ms.BorderColor       = sf.BorderColor;
            ms.BorderDashStyle   = CConvertisseurChartEnumToMSEnum.GetMSChartDashStyle(sf.BorderDashStyle);
            ms.BorderWidth       = sf.BorderWidth;
            ms.DockedToChartArea = f.DockedArea;
            ms.Docking           = CConvertisseurChartEnumToMSEnum.GetMSDocking(f.Docking);
            ms.Enabled           = sf.Enabled;
            if (sf.Font != null)
            {
                ms.Font = sf.Font;
            }
            ms.ForeColor               = sf.ForeColor;
            ms.InterlacedRows          = sf.InterlacedRows;
            ms.InterlacedRowsColor     = sf.InterlacedRowsColor;
            ms.IsDockedInsideChartArea = f.IsDockedInsideChartArea;
            ms.IsEquallySpacedItems    = sf.IsEquallySpacedItems;
            ms.IsTextAutoFit           = sf.IsTextAutoFit;
            ms.LegendItemOrder         = CConvertisseurChartEnumToMSEnum.GetMSLegendItemOrder(sf.LegendItemOrder);
            ms.LegendStyle             = CConvertisseurChartEnumToMSEnum.GetMSLegendStyle(sf.LegendStyle);
            ms.MaximumAutoSize         = f.MaximumAutoSize;
            ms.Name = f.LegendId;
            AppliquePosition(sf.Position, ms.Position);
            ms.ShadowColor       = sf.ShadowColor;
            ms.ShadowOffset      = sf.ShadowOffset;
            ms.TableStyle        = CConvertisseurChartEnumToMSEnum.GetMSLegendTableStyle(sf.TableStyle);
            ms.TextWrapThreshold = sf.TextWrapThreshold;
            ms.Title             = f.Title;
            ms.TitleAlignment    = CConvertisseurChartEnumToMSEnum.GetMSStringAlignment(f.TitleAlignment);
            ms.TitleBackColor    = f.TitleBackColor;
            if (f.TitleFont != null)
            {
                ms.TitleFont = f.TitleFont;
            }
            ms.TitleForeColor      = f.TitleForeColor;
            ms.TitleSeparator      = CConvertisseurChartEnumToMSEnum.GetMSLegendSeparatorStyle(f.TitleSeparator);
            ms.TitleSeparatorColor = f.TitleSeparatorColor;
        }
Example #3
0
        //---------------------------------------------------------------------
        private void ApplyEmptyPointStyle(CParametreSerieDeChart pSerie, Series s)
        {
            CSerieStyle style = pSerie.EmptyPointStyle;

            s.EmptyPointStyle.BackGradientStyle         = CConvertisseurChartEnumToMSEnum.GetMSGradientStyle(style.BackGradientStyle);
            s.EmptyPointStyle.BackHatchStyle            = CConvertisseurChartEnumToMSEnum.GetMSChartHatchStyle(style.BackHatchStyle);
            s.EmptyPointStyle.BackImageAlignment        = CConvertisseurChartEnumToMSEnum.GetMSChartImageAlignmentStyle(style.BackImageAlignment);
            s.EmptyPointStyle.BackImageTransparentColor = style.BackImageTransparentColor;
            s.EmptyPointStyle.BackImageWrapMode         = CConvertisseurChartEnumToMSEnum.GetMSChartImageWrapMode(style.BackImageWrapMode);
            s.EmptyPointStyle.BackSecondaryColor        = style.BackSecondaryColor;
            s.EmptyPointStyle.BorderColor     = style.BorderColor;
            s.EmptyPointStyle.BorderDashStyle = CConvertisseurChartEnumToMSEnum.GetMSChartDashStyle(style.BorderDashStyle);
            s.EmptyPointStyle.BorderWidth     = style.BorderWidth;
            if (style.SerieColor.ToArgb() != 0)
            {
                s.EmptyPointStyle.Color = Color.FromArgb(style.SerieOpacity * 255 / 100, style.SerieColor);
            }
            else
            {
                s.EmptyPointStyle.Color = s.Color;
            }
        }