CircularGauge Look
CircularGauge Look
Hi,
i try to create a circular Gauge like this
How to make a 180°circular instead full circle, by default ?
How to change the needle look ?
Thanks for your help
i try to create a circular Gauge like this
How to make a 180°circular instead full circle, by default ?
How to change the needle look ?
Thanks for your help
Re: CircularGauge Look
Circular gauge will always be a full circle, though you can set where the data ticks start by using setRotationAngle and setTotalAngle. If you want a 180 gauge use the regular Gauges series.
Re: CircularGauge Look
Hi Mulderone,
I get the gauges in the image below with the following code:
I get the gauges in the image below with the following code:
Code: Select all
tChart1.getHeader().setVisible(false);
tChart1.getPanel().setColor(Color.fromArgb(167, 200, 85));
Gauges gauges1 = new Gauges(tChart1.getChart());
gauges1.setTotalAngle(180);
gauges1.setRotationAngle(180);
gauges1.setMaximum(120);
gauges1.setValue(60);
gauges1.getVertAxis().getLabels().setVisible(false);
gauges1.getVertAxis().setIncrement(10);
gauges1.getVertAxis().getTicks().setLength(10);
gauges1.getVertAxis().getTicks().setWidth(3);
gauges1.getVertAxis().getTicks().setColor(Color.WHITE);
gauges1.getVertAxis().getMinorTicks().setVisible(false);
gauges1.getVertAxis().getAxisPen().setVisible(false);
gauges1.getPen().setColor(Color.WHITE);
gauges1.getCenter().getPen().setVisible(false);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CircularGauge Look
Marvellous!!!!
Thanks for your help
Thanks for your help
Re: CircularGauge Look
Hi Yeray,
it works but i'm using the android version of this library and i have a half-circle at the bottom which remains.
I don't know how to disable it , to obtain the same chart as you
it works but i'm using the android version of this library and i have a half-circle at the bottom which remains.
I don't know how to disable it , to obtain the same chart as you
Re: CircularGauge Look
i give you a screen capture of my android app, as you see , i have a gray semi circle at the chart's bottom
Re: CircularGauge Look
Hi Mulderone,
It seems there's a bug here. I'm trying to find a definitive fix.
In the meanwhile, since you are source code customer, you could apply a temporal fix manually. In Graphics3DAndroid.java (in com/steema/teechart/android/), you'll find the arc method says:
Change the above for the following, just adding a condition:
It seems there's a bug here. I'm trying to find a definitive fix.
In the meanwhile, since you are source code customer, you could apply a temporal fix manually. In Graphics3DAndroid.java (in com/steema/teechart/android/), you'll find the arc method says:
Code: Select all
public void arc(int x1, int y1, int x2, int y2, final double startAngle,
final double sweepAngle) {
canvas.drawArc(new RectF(x1,y1,x2,y2), (float)startAngle, (float)sweepAngle,
false, pen.getPaint());
}
Code: Select all
public void arc(int x1, int y1, int x2, int y2, final double startAngle,
final double sweepAngle) {
if (pen.visible) {
canvas.drawArc(new RectF(x1,y1,x2,y2), (float)startAngle, (float)sweepAngle,
false, pen.getPaint());
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CircularGauge Look
i'll try that and i'll keep you in touch
Re: CircularGauge Look
It works, the bottom semi-circle disappear.
But i think that the overall rectangle size must be calculated again , to fit the inside draw, as the screen shot you put in your previous reply
But i think that the overall rectangle size must be calculated again , to fit the inside draw, as the screen shot you put in your previous reply
Re: CircularGauge Look
Hi Mulderone,
Right. That's what I've just done. It will be fixed with the next maintenance release.
If you need the changes tell me and I'll send/explain you.
Right. That's what I've just done. It will be fixed with the next maintenance release.
If you need the changes tell me and I'll send/explain you.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CircularGauge Look
Hi,
yes, until the next delivery, it would be nice if you send me or explain the solution
Best regards
yes, until the next delivery, it would be nice if you send me or explain the solution
Best regards
Re: CircularGauge Look
Hi Mulderone,
I'll send you the changes to the mail account you have registered in this forum.
I'll send you the changes to the mail account you have registered in this forum.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CircularGauge Look
Yeray,
it doesn't work. The rectangle which contains the drawing circle is the same as my previous post as if the circle is complete instead of a wanted semi-circle.
it doesn't work. The rectangle which contains the drawing circle is the same as my previous post as if the circle is complete instead of a wanted semi-circle.
Re: CircularGauge Look
Hi Mulderone,
I've just verified it.This is my testing application:
The code above, with TeeChart Java for Android v3.2012.0202, gives me the following result:
With the changes I sent you, it changes to this:
Then, if I add the following line:
This is what I get (TeeChart Java for Android v3.2012.0202 with TJ71016219 fix):
Could you please check it again? Please, make sure you make a full Clean&Rebuild.
I've just verified it.This is my testing application:
Code: Select all
package com.steema.test;
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import com.steema.teechart.TChart;
import com.steema.teechart.drawing.Color;
import com.steema.teechart.styles.Gauges;
public class AndroidTestActivity extends Activity {
private TChart tChart1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout group = (LinearLayout) findViewById(R.id.linearLayoutTchart);
createChart(group);
initializeChart();
}
private void createChart(LinearLayout group) {
tChart1 = new TChart(this);
group.addView(tChart1);
}
private void initializeChart() {
tChart1.getHeader().setVisible(false);
tChart1.getPanel().setColor(Color.fromArgb(167, 200, 85));
Gauges gauges1 = new Gauges(tChart1.getChart());
gauges1.setTotalAngle(180);
gauges1.setRotationAngle(180);
gauges1.setMaximum(120);
gauges1.setValue(60);
gauges1.getVertAxis().getLabels().setVisible(false);
gauges1.getVertAxis().setIncrement(10);
gauges1.getVertAxis().getTicks().setLength(10);
gauges1.getVertAxis().getTicks().setWidth(3);
gauges1.getVertAxis().getTicks().setColor(Color.WHITE);
gauges1.getVertAxis().getMinorTicks().setVisible(false);
gauges1.getVertAxis().getAxisPen().setColor(Color.RED);
gauges1.getVertAxis().getAxisPen().setWidth(1);
gauges1.getPen().setColor(Color.WHITE);
gauges1.getCenter().getPen().setVisible(false);
}
}
Code: Select all
gauges1.getVertAxis().getAxisPen().setVisible(false);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CircularGauge Look
yes, me too, i do exactly what you ask me to do.
So, the resulting chart as the same size as before as if only the bottom semi-circle isn't drawn but the used space already exist.
What i expect is a "packed" semi-circle, without the bottom space which has the same size as the upper semi-circle
So, the resulting chart as the same size as before as if only the bottom semi-circle isn't drawn but the used space already exist.
What i expect is a "packed" semi-circle, without the bottom space which has the same size as the upper semi-circle