/// <summary>
        /// Creates a DataLabelStyle from the given connector angle and color.
        /// </summary>
        /// <param name="angle"></param>
        /// <param name="color"></param>
        /// <returns></returns>
        private void SetupDataLabelStyle(ChartSeries series)
        {
            DataLabelVisualStyle dtStyle = series.DataLabelVisualStyle;

            dtStyle.Background             = new Background(Color.FromArgb(170, Color.Green));
            dtStyle.Padding                = new DevComponents.DotNetBar.Charts.Style.Padding(3);
            dtStyle.Font                   = new System.Drawing.Font("Arial", 8, FontStyle.Italic);
            dtStyle.TextAlignment          = LineAlignment.Center;
            dtStyle.DropShadow.ShadowColor = Color.Crimson;

            dtStyle.DrawConnector = Tbool.True;

            dtStyle.ApplyDefaults();
        }
Exemple #2
0
        /// <summary>
        /// Creates a DataLabelStyle from the given connector angle and color.
        /// </summary>
        /// <param name="angle"></param>
        /// <param name="color"></param>
        /// <returns></returns>
        private DataLabelVisualStyle SetupDataLabelStyle(int angle, Color color)
        {
            DataLabelVisualStyle dtStyle = new DataLabelVisualStyle();

            dtStyle.Background             = new Background(Color.FromArgb(170, color));
            dtStyle.Padding                = new DevComponents.DotNetBar.Charts.Style.Padding(3);
            dtStyle.Font                   = new System.Drawing.Font("Arial", 8, FontStyle.Italic);
            dtStyle.TextAlignment          = LineAlignment.Center;
            dtStyle.DropShadow.ShadowColor = Color.Crimson;

            dtStyle.DrawConnector = Tbool.True;
            dtStyle.ConnectorLineStyle.DefaultAngle = angle;

            dtStyle.ApplyDefaults();

            return(dtStyle);
        }