Page 1 of 1
WPF: NumericGauge
Posted: Wed Aug 21, 2013 11:31 am
by 15666029
Using latest release I try to change the colors of the markers and background color in a numericgauge but it seems I'm not changing the correct values or it just won't work.
To change the background I use .FaceBrush.Color and vor the markers I use .marker(0).shape.font.color. Is that correct?
Thanks in advance!
Re: WPF: NumericGauge
Posted: Thu Aug 22, 2013 10:19 am
by 10050769
Hello gbs,
Ok. If you want change the aspect of NumericGauge by code, you can do something as I suggest in next code:
Code: Select all
Steema.TeeChart.TChart tChart1;
public Form1()
{
InitializeComponent();
tChart1 = new TChart();
this.Controls.Add(tChart1);
tChart1.Left = 150;
tChart1.Top = 100;
InitializeChart();
}
//SizeF sizeTitle;
Steema.TeeChart.Styles.NumericGauge numericgauge1;
private void InitializeChart()
{
numericgauge1 = new NumericGauge(tChart1.Chart);
numericgauge1.FaceBrush.Gradient.Visible = false;
numericgauge1.FaceBrush.Color = Color.Green;
//Must disable the defaulte palette.
numericgauge1.Markers[0].UsePalette = false;
numericgauge1.Markers[0].Shape.Font.Color = Color.Red;
//Change color brush of Marker to Green.
numericgauge1.Markers[0].Shape.Color = Color.Green;
//Do transparent the burhs of Marker.
// numericgauge1.Markers[0].Shape.Transparent = true;
}
Could you tell us previous code help you to achieve as you want?
I hope will helps.
Thanks,
Re: WPF: NumericGauge
Posted: Thu Aug 22, 2013 2:37 pm
by 15666029
Hi Sandra,
thanks a lot, that worked without any problems!