Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1725

Summary: Incorporate TextFormat.Html text fully into the Annotation tool.
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: ToolsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description christopher ireland 2016-12-15 07:27:45 EST
At the moment we can do:

  public class MyAnnotation : Annotation
  {
    public MyAnnotation(Chart c) : base(c) { }

    protected override void DrawString(Graphics3D g, int x, int y, int t, int tmpHeight, string[] s)
    {
      g.TextOut(x, y + (t - 1) * tmpHeight, 0, s[t - 1], Shape.TextFormat == TextFormat.Html);
    }
  }

And then:

    private void InitializeChart()
    {
      MyAnnotation tool = new MyAnnotation(tChart1.Chart);
      tool.Shape.TextFormat = TextFormat.Html;
      tool.Shape.Font.Size = 20;
      tool.Text = "<b>Hello</b>" + Texts.LineSeparator + "<i>World</i>";
    }

However, Annotatioin.AutoSize does not work under all circumstances for the size of the text. This request to incorporate these changes in the Annotation tool and to better its sizing with Html text.