Hello
Im a new user of TeeChart.
My X-axis data generally consists of very small numbers ie. along the lines 0.000067 etc.
TeeChart will usually label this as 0.
I can solve the problem by simply multiplying my x-coords by 10,000. However Ive a lot of points and several lines so this is quite processor intesive.
I was wondering whether its possible to simpy change the labels that TeeChart displays. Like to instruct TeeChart to label the X-coord as X-coord * 10,000 or some other integer that I specify.
How To Change Scale Labels
Hi Dave,
You can force your axis labels to be shown with the real values. For example, for 0.000067, you need 6 decimals:
You can force your axis labels to be shown with the real values. For example, for 0.000067, you need 6 decimals:
Code: Select all
tChart1.Axes.Left.Labels.ValueFormat = "0.######";
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Hi Dave,
Yes, but then you should use OnGetAxisDrawLabel event and modify/format your labels as you wish. Something as this example:
Yes, but then you should use OnGetAxisDrawLabel event and modify/format your labels as you wish. Something as this example:
Code: Select all
Line line1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
line1 = new Line(tChart1.Chart);
line1.Add(0.000056);
line1.Add(0.000086);
line1.Add(0.000034);
line1.Add(0.000028);
line1.Add(0.000042);
tChart1.Axes.Left.Labels.ValueFormat = "0.######";
tChart1.Axes.Left.GetAxisDrawLabel += new Steema.TeeChart.GetAxisDrawLabelEventHandler(Left_GetAxisDrawLabel);
}
void Left_GetAxisDrawLabel(object sender, Steema.TeeChart.GetAxisDrawLabelEventArgs e)
{
e.Text = (float.Parse(e.Text) * 10000).ToString();
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |