I want a chart has fixed label size for left-right axes..
But when i set to label size big numbers couldnt seen ..
If value of axis bigger than 99999 (for example 200000) i want to show it as 200
(by divide all values to 1000) ..
So i have to add Legend at bottom of the axis...
What is the best way to do this...
Label size problem for big numbers?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi glikoz,
You could implement it in the GetAxisLabel event, doing something like:
You could implement it in the GetAxisLabel event, doing something like:
Code: Select all
private void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (((sender==tChart1.Axes.Left) || (sender==tChart1.Axes.Right))&& (e.LabelText.Length>6))
{
e.LabelText=e.LabelText.Remove(3,e.LabelText.Length-3);
}
}
Best Regards,
Narcís Calvet / 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 |
It doesnt work..
It doesnt work ..Because Left Axis has labels like that (0,20000,50000,150000,300000) ..
I have to show this values as (0,20,50,150,300)
With your advice this values seem as (0,20000,50000,150,300)..
I have to show this values as (0,20,50,150,300)
With your advice this values seem as (0,20000,50000,150,300)..
Could I do that over ValueFormat property
is valueFormat property has "divide 1000" ability?
From your advice?
I think i have to detect is Axis(Left or Right) Maximum Value bigger than 99999 ..Then i will format Axis's values ..
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi glikoz,
Then you could do something like:
Then you could do something like:
Code: Select all
private void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (((sender==tChart1.Axes.Left) || (sender==tChart1.Axes.Right)) && (line1.MaxYValue()>99999))
{
e.LabelText=e.LabelText.Remove(3,e.LabelText.Length-3);
}
}
Best Regards,
Narcís Calvet / 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 |