Page 1 of 1

Chart width in pixels

Posted: Fri Jul 23, 2004 8:16 am
by 9082701
Hi,

I want to know how many pixels for drawing a serie is available (serie "horizontal length" in pixels). At present I do it in this way:
With tChart1.axis
width=.Right.Position - .Left.Position
end with

But I don't like this solution. Isn't there a property for it?

Thanx

Posted: Mon Jul 26, 2004 11:30 am
by Chris
Hi Roman,
But I don't like this solution. Isn't there a property for it?
I'm afraid there isn't .. don't forget that you can use it outside of the TeeChart events thus:

Code: Select all

Private Sub Form_Load()
Dim s As String
With TChart1
    .AddSeries scLine
    .Series(0).FillSampleValues 20
    .Environment.InternalRepaint
    s = .Axis.Right.Position - .Axis.Left.Position
    Label1.Caption = s
End With
End Sub