Page 1 of 1

Annotation Not Working Correctly

Posted: Mon Aug 08, 2011 7:32 pm
by 9639571
I have recently upgraded from an older version and am having issues with the Annotation. I used to write the code as shown below:

Dim Annotation1 As New Steema.TeeChart.Tools.Annotation(qualityratiochart.Chart)
Annotation1.Active = True
Annotation1.Shape.Color = Drawing.Color.Transparent
Annotation1.Shape.CustomPosition = True
Annotation1.Left = 200
Annotation1.Top = 200
Annotation1.Text = "TEST"

This code doesnt seem to work now, it just places the annotation in the top left corner, with no text associated with it.

Help!!!

Re: Annotation Not Working Correctly

Posted: Tue Aug 09, 2011 11:50 am
by 10050769
Hello phil1995,

I couldn't reproduce your problem using next code and last version of TeeChart.Net:

Code: Select all

 Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()
        InitializeChart()

        ' Add any initialization after the InitializeComponent() call.

    End Sub
    Private Sub InitializeChart()
        Dim line1 As New Steema.TeeChart.Styles.Line(TChart1.Chart)
        line1.FillSampleValues()

        Dim Annotation1 As New Steema.TeeChart.Tools.Annotation(TChart1.Chart)

        Annotation1.Active = True
        Annotation1.Shape.Color = Color.Transparent
        Annotation1.Shape.CustomPosition = True
        Annotation1.Left = 200
        Annotation1.Top = 200
        Annotation1.Text = "TEST"
    End Sub
Could you please, tell us if your problem appears using previous code?

Thanks,