Exemple #1
0
        public static void ConfigureAnnotations(this AnnotationTool tool, bool floating, string text)
        {
            tool.ClipText         = false;
            tool.Shape.TextFormat = TextFormat.Html;
            tool.Shape.Font.Size  = 15;

            tool.Position = floating
                                                                ? AnnotationPositions.Custom
                                                                : AnnotationPositions.RightTop;

            tool.Text = text;
            // tool.AutoSize = true;
            tool.Active = !string.IsNullOrWhiteSpace(text);
            if (tool.Active)
            {
                tool.Width  = tool.Chart.Graphics3D.TextWidth(text);
                tool.Height = tool.Chart.Graphics3D.TextHeight(text);
            }

            tool.Invalidate();
        }
Exemple #2
0
 public static Point GetPoint(this AnnotationTool tool,
                              in Chart chart,
Exemple #3
0
 public static void ConfigureAnnotations(this AnnotationTool tool, bool floating) => tool.ConfigureAnnotations(floating, string.Empty);