Chart width in pixels

TeeChart for ActiveX, COM and ASP
Post Reply
Roman
Newbie
Newbie
Posts: 5
Joined: Thu Jun 03, 2004 4:00 am
Location: Czech Republic

Chart width in pixels

Post by Roman » Fri Jul 23, 2004 8:16 am

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jul 26, 2004 11:30 am

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
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply