Hi,
I have a series of linear gauges displaying OK and I can set the range to -50 to +50. However, is it possible when I set the Gauge.value to say -25 that the horizontal bar starts at the zero point and extends left or right to negative or positive values respectively rather than from the far left?
If so then can the colours also be set for certain range i.e. green if between -10 and +10, yellow and then say red if less than -30 and more than +30
Any assistance greatly appreciated.
Cheers
Rob
Linear Gauge with Zero in center
-
- Newbie
- Posts: 6
- Joined: Wed Apr 16, 2008 12:00 am
- Location: Australia
- Contact:
Linear Gauge with Zero in center
- Attachments
-
- example of gauge I am trying to reproduce
- LinearGaugeExample.gif (8.07 KiB) Viewed 4496 times
Re: Linear Gauge with Zero in center
Hello Innervations,
I have think you can do something as next code, where I change minimum and maximum values of Series because LinerSeries set negative values:
Can you please, tell us if previous code works as you expected? On the other hand, I recommend take a look in Demo Project examples, concretely All Features\Welcome !\Chart styles\Gauges where you can more information how you treat Gauges series.
I hope will helps.
Thanks,
I have think you can do something as next code, where I change minimum and maximum values of Series because LinerSeries set negative values:
Code: Select all
private void InitializeChart()
{
Steema.TeeChart.Styles.LinearGauge linerGauge = new LinearGauge(tChart1.Chart);
linerGauge.Add(-50);
linerGauge.Add(-25);
linerGauge.Add(0);
linerGauge.Add(25);
linerGauge.Add(50);
linerGauge.Value = 20;
linerGauge.Maximum = 50;
linerGauge.Minimum = -50;
linerGauge.UseValueColorPalette = true;
linerGauge.GreenLineStartValue = -50;
linerGauge.GreenLineEndValue = 0;
linerGauge.RedLineStartValue = 0;
linerGauge.RedLineStartValue = 25;
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |