Gauge/Pie combination in 3d?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Gauge/Pie combination in 3d?

Post by Hi Octane » Fri Oct 06, 2006 3:18 pm

Hi,
I'm trying to make a chart that has a pie chart behind a gauge. It works fine except I can't find a way to make it appear 3d. The boss thinks the 2d look is too 'boring'. One problem is the 3d on pies appears at the bottom and i'm using a semi-pie and a gauge set at 180 degrees. When I set the 3d property, things get out of wack on the gauge, i don't think it's meant to work that way. Any insight would be appreciated.
Thanks,
Rick

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

Post by Narcís » Mon Oct 09, 2006 9:22 am

Hi Rick,

This is most likely because gauges don't support 3D view. I'll add your request to our wish-list to be considered for inclusion in future releases.
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

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Example of Graph Object

Post by Hi Octane » Mon Oct 09, 2006 2:45 pm

Thanks Narcis for the reply. I've attached a picture of what I'm trying to create with a TDonutSeries combined with a TGaugeSeries. There are other controls out there 'similar' to this, but I think if you could enhance your gauge series by adding tdonut or tpie into it, this could be a useful and powerful graph object. My problems currently are trying to resize the gauge object to line up the marks to the donut object, especially if I allow the ability to change 3d depth, etc. on the donut.
Thanks,
Rick

Image

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

Post by Narcís » Mon Oct 09, 2006 2:54 pm

Hi Rick,

Thanks for the information. I've included it to the wish-list entry.
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

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Gauge Positioning

Post by Hi Octane » Mon Oct 16, 2006 2:23 pm

Because the gauge doesn't support 3d, I'm trying to position the gauge up and down to line up with the 3d donut. Could you tell me what method or event I could call in the TGauge that could help me override its default positioning?
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 » Mon Oct 16, 2006 2:59 pm

Hi Octane,

You may achieve that creating your custom gauges inheriting from TGaugeSeries and overriding its DrawAllValues method.
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

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

overriding DrawAllValues

Post by Hi Octane » Mon Oct 16, 2006 7:24 pm

I override the procedure 'DrawAllValues', but what properties do I change in order for the gauge's position to move?

Thanks,
Rick

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Post by Hi Octane » Wed Oct 18, 2006 2:31 pm

I override the procedure 'DrawAllValues', but what properties do I change in order for the gauge's position to move?
Thanks,
Rick

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Post by Hi Octane » Fri Oct 20, 2006 1:35 pm

Please respond soon.

I override the procedure 'DrawAllValues', but what properties do I change in order for the gauge's position to move?
Thanks,
Rick

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

Post by Narcís » Fri Oct 20, 2006 2:14 pm

Hi Rick,

Sorry but we don't offer support for the source code.
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

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Post by Hi Octane » Fri Oct 20, 2006 2:58 pm

I didn't plan on changing any source code in the control, just overriding methods and changing postions of the ticks in order to line up with 3d positions of another graph object. I just need the ticks of the gauge to line up with the donut control's 3d outline.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Oct 24, 2006 3:47 pm

Hi Rick,

in order to move the Gauge labels and ticks you will have to use the CustomXRadius and CustomYRadius properties :

Series2.CustomXRadius:=50;
Series2.CustomYRadius:=50;

Hi Octane
Newbie
Newbie
Posts: 11
Joined: Tue Aug 29, 2006 12:00 am

Post by Hi Octane » Tue Oct 24, 2006 3:52 pm

Pep,
I did that, but they didn't line up with the TDonut when it was set to 3D look. I did find a solution, which involved overriding the DrawAllValues function, copying all the code from it, modifying the code to use the TDonut Rect by getting it with the CalcRect3D function and not using inherited so that all the drawing was with the new function. It works pretty good actually, even when zooming or changing 3d properties. Now all I need to do is get the gauge pointer to look nicer.
Thanks,
Rick

Post Reply