TeeChart for .NET v2009 - CircularGauge
Posted: Mon Aug 17, 2009 1:40 pm
Hello support team,
I am trying to implement a circular gauge implemented like a face of a clock with only one arm. I am also trying to include the embedded numeric gauge. The initial value of zero and final value of one hundred are located at 12 o'clock. When the labels are rotated, the labels appear in the correct position. But when the labels are not rotated, some of the labels are not in the position of the digits on a clock face (the digits that appear after 6 o'clock). The following code is what I have so far.
(Change the boolean value of cGauge.RotateLabels = true; to cGauge.RotateLabels = false; to see the problem).
I would also like to try to make the numeric gauge appear with a black background, a white boarder and white digits.
Thanks,
Robert
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Steema.TeeChart.Styles;
namespace CGauge001
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
private CircularGauge cGauge;
private void InitializeChart()
{
tChart1.Series.Add(cGauge = new CircularGauge());
cGauge.NumericGauge.Visible = false;
cGauge.Value = 1;
cGauge.Axis.Labels.Font.Size = 12;
cGauge.Axis.Labels.Font.Color = CustomGauge.GetGaugePaletteColor(20, cGauge.GaugeColorPalette);
cGauge.NumericGauge.ValueFormat = "###.0";
cGauge.NumericGauge.ValueMarker.Shape.Font.Size = 14;
cGauge.TotalAngle = 360;
cGauge.RotateLabels = true;
cGauge.DisplayRotationAngle = 0;
cGauge.RotationAngle = 180;
cGauge.RedLine.Visible = false;
cGauge.GreenLine.Visible = false;
}
}
}
I am trying to implement a circular gauge implemented like a face of a clock with only one arm. I am also trying to include the embedded numeric gauge. The initial value of zero and final value of one hundred are located at 12 o'clock. When the labels are rotated, the labels appear in the correct position. But when the labels are not rotated, some of the labels are not in the position of the digits on a clock face (the digits that appear after 6 o'clock). The following code is what I have so far.
(Change the boolean value of cGauge.RotateLabels = true; to cGauge.RotateLabels = false; to see the problem).
I would also like to try to make the numeric gauge appear with a black background, a white boarder and white digits.
Thanks,
Robert
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Steema.TeeChart.Styles;
namespace CGauge001
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
private CircularGauge cGauge;
private void InitializeChart()
{
tChart1.Series.Add(cGauge = new CircularGauge());
cGauge.NumericGauge.Visible = false;
cGauge.Value = 1;
cGauge.Axis.Labels.Font.Size = 12;
cGauge.Axis.Labels.Font.Color = CustomGauge.GetGaugePaletteColor(20, cGauge.GaugeColorPalette);
cGauge.NumericGauge.ValueFormat = "###.0";
cGauge.NumericGauge.ValueMarker.Shape.Font.Size = 14;
cGauge.TotalAngle = 360;
cGauge.RotateLabels = true;
cGauge.DisplayRotationAngle = 0;
cGauge.RotationAngle = 180;
cGauge.RedLine.Visible = false;
cGauge.GreenLine.Visible = false;
}
}
}