/// <summary> /// Shows a message on your chart /// </summary> /// <param name="chart">The chart</param> /// <param name="message">The message</param> /// <param name="objectSuffix">The optional suffix that will be appended at the end of message object</param> /// <param name="verticalAlignment">The vertical alignment of message on chart</param> /// <param name="horizontalAlignment">The horizontal alignment of message on chart</param> /// <param name="color">The color of message on chart</param> public static ChartStaticText ShowMessage(this ChartArea chartArea, string message, string objectSuffix, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, Color color) { objectSuffix = objectSuffix ?? string.Format("No_Suffix_{0}", DateTime.Now.Ticks); var chartObjectName = string.Format("Message_{0}_{1}", DateTime.Now.Ticks, objectSuffix); return(chartArea.DrawStaticText(chartObjectName, message, verticalAlignment, horizontalAlignment, color)); }