Page 1 of 1

Changing the value color on linear gauge

Posted: Thu Jun 07, 2012 2:56 pm
by 15359204
I'm trying to change the color of the value bar on the linear gauge. Can't get it to work. I've tried:

linearGaugeSeries = new LinearGauge(chart1.getChart());
linearGaugeSeries.getValueAreaBrush().setColor(Color.RED);
linearGaugeSeries.getValueAreaBrush().setForegroundColor(Color.RED);
linearGaugeSeries.getFaceBrush().setColor(Color.RED);
linearGaugeSeries.getFaceBrush().setForegroundColor(Color.RED);

but it always stays blue like this screenshot. This is with the v2012 evaluation version.

Re: Changing the value color on linear gauge

Posted: Thu Jun 07, 2012 3:13 pm
by 15359204
Also having a probelm setting the increment on a regular Gauges series.

double dHigh = 8000;
double dLow = 0;
gaugeSeries = new Gauges(chart1.getChart());

gaugeSeries.setMinimum(dLow);
gaugeSeries.setMaximum(dHigh);

gaugeSeries.getHorizAxis().setIncrement((dHigh - dLow)/10);
gaugeSeries.getVertAxis().setIncrement((dHigh - dLow)/10);
chart1.getAxes().getLeft().setIncrement((dHigh - dLow)/10);
chart1.getAxes().getBottom().setIncrement((dHigh - dLow)/10);

Re: Changing the value color on linear gauge

Posted: Mon Jun 11, 2012 1:57 pm
by yeray
Hi Mark,
mts wrote:I'm trying to change the color of the value bar on the linear gauge. Can't get it to work.
Try with:

Code: Select all

linearGaugeSeries.getHand().setColor(Color.RED);
mts wrote:Also having a probelm setting the increment on a regular Gauges series.
You are right. It seems the Gauges axis increment is forced to 10. I've fixed it for the next maintenance release so this will work fine:

Code: Select all

gaugeSeries.getVertAxis().setIncrement((dHigh - dLow)/10);

Re: Changing the value color on linear gauge

Posted: Wed May 29, 2013 9:05 pm
by 15355256
About mts problem, I have the same problem.

Do you have a date to release this fix?

Re: Changing the value color on linear gauge

Posted: Thu May 30, 2013 2:52 pm
by yeray
Hi,
WhebJava wrote:About mts problem, I have the same problem.

Do you have a date to release this fix?
I see two problems here:

One with a workaround suggested:
Yeray wrote:
mts wrote:I'm trying to change the color of the value bar on the linear gauge. Can't get it to work.
Try with:

Code: Select all

linearGaugeSeries.getHand().setColor(Color.RED);
And a second one that should be fixed with v3.2013.0517:
Yeray wrote:
mts wrote:Also having a probelm setting the increment on a regular Gauges series.
You are right. It seems the Gauges axis increment is forced to 10. I've fixed it for the next maintenance release so this will work fine:

Code: Select all

gaugeSeries.getVertAxis().setIncrement((dHigh - dLow)/10);
Which one of the problems are you reproducing? And what TeeChart version are you using?