How to make Semi Circular Gauge

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
mts
Newbie
Newbie
Posts: 18
Joined: Fri Apr 29, 2011 12:00 am

How to make Semi Circular Gauge

Post by mts » Thu May 31, 2012 9:28 pm

In the gallery there is a very nice looking gauge titled a semi-circular gauge. I am curious how to make something similar. I've looked through the examples I could find but there only seems to be one example for a circular gauge. Is there a place to find the source code example for a semi circular one? Is this a circular gauge series with adjustments for the angle etc?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to make Semi Circular Gauge

Post by Yeray » Fri Jun 01, 2012 10:54 am

Hi,

First of all note this example in the gallery was made with TeeChart .NET. Although, we always try to maintain all the versions as similar as possible, it seems the setDisplayTotalAngle and setDisplayRotationAngle (and the correspondent get*) methods, necessary to produce this semicircular gauges, aren't implemented in the Java version yet.
We're working on it and hopefully they will be included in the next maintenance release. So the following code should work in the next version:

Code: Select all

        com.steema.teechart.themes.ThemesList.applyTheme(tChart1.getChart(), 1);
        CircularGauge circular1 = new CircularGauge(tChart1.getChart());
        circular1.fillSampleValues();
        circular1.setDisplayTotalAngle(170);
        circular1.setTotalAngle(150);
        circular1.setDisplayRotationAngle(5);
        circular1.setHandOffset(0);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply