hi,
Is there a method to resize a numeric gauge ( width,length)?
thank
Numeric gauge size
Re: Numeric gauge size
Hello micropross,
I suggest you three ways for change size of NumericGauge:
First: Using CustomBounds for change size of NumericGauges as do in next example:
Second: Using MultipleCharts and changing directly size of ChartRect of Chart. You can do something as next example:
Third:You can use SubChartTool with NumericGauges and change size of SubChartTool. You can do something as next example:
Could you tell us if previous codes works as you want?
I hope will helps.
Thanks,
I suggest you three ways for change size of NumericGauge:
First: Using CustomBounds for change size of NumericGauges as do in next example:
Code: Select all
private void InitializeChart()
{
tChart1.Series.Clear();
tChart1.Tools.Clear();
Steema.TeeChart.Styles.NumericGauge series0 = new Steema.TeeChart.Styles.NumericGauge(tChart1.Chart);
series0.FillSampleValues();
}
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
InitializeChart();
Rectangle tmpR;
tmpR = (tChart1[0] as Steema.TeeChart.Styles.NumericGauge).CustomBounds;
tmpR.Height = 200;
tmpR.Width = 300;
(tChart1[0] as Steema.TeeChart.Styles.NumericGauge).CustomBounds = tmpR;
}
Code: Select all
private void button2_Click(object sender, EventArgs e)
{
tChart1.Series.Clear();
tChart1.Tools.Clear();
Steema.TeeChart.Styles.NumericGauge series1 = new Steema.TeeChart.Styles.NumericGauge(tChart1.Chart);
Steema.TeeChart.Styles.NumericGauge series2 = new Steema.TeeChart.Styles.NumericGauge(tChart1.Chart);
Steema.TeeChart.Styles.NumericGauge series3 = new Steema.TeeChart.Styles.NumericGauge(tChart1.Chart);
Steema.TeeChart.Styles.NumericGauge series4 = new Steema.TeeChart.Styles.NumericGauge(tChart1.Chart);
series1.FillSampleValues();
series2.FillSampleValues();
series3.FillSampleValues();
series4.FillSampleValues();
series1.BeforeDrawValues = new Steema.TeeChart.PaintChartEventHandler(series1_BeforeDrawValues);
series2.BeforeDrawValues = new Steema.TeeChart.PaintChartEventHandler(series2_BeforeDrawValues);
series3.BeforeDrawValues = new Steema.TeeChart.PaintChartEventHandler(series3_BeforeDrawValues);
series4.BeforeDrawValues = new Steema.TeeChart.PaintChartEventHandler(series4_BeforeDrawValues);
}
void series4_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//You can change the Height and width of ChartRect.
this.tChart1.Chart.ChartRect = new Rectangle(this.tChart1.Width / 2, this.tChart1.Height / 2, this.tChart1.Width / 2, this.tChart1.Height / 2);
}
void series3_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//You can change the Height and Width of ChartRect.
this.tChart1.Chart.ChartRect = new Rectangle(15, this.tChart1.Height / 2, this.tChart1.Width / 2 , this.tChart1.Height / 2);
}
void series2_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//You can change the Height and Width of ChartRect.
this.tChart1.Chart.ChartRect = new Rectangle(this.tChart1.Width / 2, 15, this.tChart1.Width / 2, this.tChart1.Height / 2);
}
void series1_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//You can change the Height and Width of ChartRect.
this.tChart1.Chart.ChartRect = new Rectangle(15, 15, this.tChart1.Width / 2, this.tChart1.Height / 2);
}
Code: Select all
private void button3_Click(object sender, EventArgs e)
{
tChart1.Series.Clear();
//Created a SubChart
Steema.TeeChart.Tools.SubChartTool subChartTool1;
Steema.TeeChart.TChart chart;
tChart1.Tools.Add(subChartTool1 = new Steema.TeeChart.Tools.SubChartTool());
chart = subChartTool1.Charts.AddChart("Chart0");
//Add Series
Steema.TeeChart.Styles.NumericGauge series = new Steema.TeeChart.Styles.NumericGauge(chart.Chart);
//Change Size of subChart
chart.Width = 200;
chart.Height = 150;
chart.Draw();
}
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 |
-
- Newbie
- Posts: 13
- Joined: Mon Oct 04, 2010 12:00 am
Re: Numeric gauge size
hi,
i can't reduce characters height. it look limited
thanks
i can't reduce characters height. it look limited
thanks
Re: Numeric gauge size
Hello micropross,
You need use Markers of your NumericGauge. NumericGauge have to default 3 Markers, so if you want change size of text you must do something as line below:
Thanks,
You need use Markers of your NumericGauge. NumericGauge have to default 3 Markers, so if you want change size of text you must do something as line below:
Code: Select all
series0.Markers[0].Shape.Font.Size = 50;
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 |