Aspect Ratios of Pie charts on wide format monitors

TeeChart for ActiveX, COM and ASP
Post Reply
psc
Newbie
Newbie
Posts: 16
Joined: Wed May 05, 2004 4:00 am

Aspect Ratios of Pie charts on wide format monitors

Post by psc » Tue Dec 12, 2006 4:27 pm

Pie charts on wide screen format screens are displayed as ellipses for certain screen resolution even when I use the property (.asPie.Circled = True). For example 800x600 = "pie ok"; 1024x600 = "elliptical pie"; 1024x768 = "pie ok"; 1280x768 = "elliptical pie".

I can send screenshots if needed.

Thanks for your help.

Using TeeChart Pro v6.0.0.5

psc
Newbie
Newbie
Posts: 16
Joined: Wed May 05, 2004 4:00 am

Post by psc » Mon Dec 18, 2006 9:47 am

Dear Steema Support,

Could you please respond to my question?

Thanks

psc
Newbie
Newbie
Posts: 16
Joined: Wed May 05, 2004 4:00 am

Post by psc » Mon Dec 18, 2006 11:25 am

I have now tested the problem on other wide format monitors and the result is the same, the pie chart does not appear as a circle, it is elliptical. For example the Dell 24 inch (2407WFP) Monitor, HP Notebook Pavilion zd7000 and Sony Vaio PCG-TR5MP. Would you like me to send some screen shots? Have you been able to reproduce the problem in-house?

psc
Newbie
Newbie
Posts: 16
Joined: Wed May 05, 2004 4:00 am

Post by psc » Thu Dec 21, 2006 10:31 am

Dear Steema Support,

Have you identified what the problem is? Is it a bug? If so when can we expect it fixed?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Dec 21, 2006 10:42 am

Dear psc,

This is not currently supported as Circled property seems not to consider the screen resolution ratio to draw itself properly. We have added your request to our wish-list to be considered for inclusion in future releases.

In the meantime, the only way I can think of is manually setting pie's XRadius and YRadius (TChart1.Series(0).asPie.XRadius and TChart1.Series(0).asPie.YRadius) properties according to the screen resolution.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

psc
Newbie
Newbie
Posts: 16
Joined: Wed May 05, 2004 4:00 am

Post by psc » Thu Dec 21, 2006 10:47 am

Would it be possible for to provide a code sample for this? I am resizing the form so it is not obvious what the radius should be.

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Dec 21, 2006 12:19 pm

Hi psc,

You can modify pie radius using something like the code below and then apply screen resolution as told in one of those pages:

http://www.freevbcode.com/ShowCode.asp? ... NoBox=True
http://www.newton.dep.anl.gov/askasci/comp99/CS029.htm

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).FillSampleValues 5
    TChart1.Series(0).asPie.Circled = False
End Sub

Private Sub Form_Resize()
    Me.TChart1.Width = Me.Width
    Me.TChart1.Height = Me.Height
    TChart1.Environment.InternalRepaint
End Sub

Private Sub TChart1_OnAfterDraw()
    
    With TChart1.Series(0).asPie
        
        If .XRadius < .YRadius Then
            .YRadius = .XRadius
        Else
            .XRadius = .YRadius
        End If
    End With
    
End Sub
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

psc
Newbie
Newbie
Posts: 16
Joined: Wed May 05, 2004 4:00 am

Post by psc » Thu Dec 21, 2006 1:26 pm

Hi Narcis,

That example does not work. It seems every time you set the radius in the event the chart seems to draw itself again as an ellipsce and resets the radius resulting in the chart getting smaller and smaller till it dissapears. The behaviour on a "non wide screen monitor" is fine and the pie only dissappears on a wide format monitor.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Dec 21, 2006 4:12 pm

Hi psc,

That's why you should add support for wide screen resolution here as shown in one of the websites I posted.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply