Hi,
We have one requirement wherein we need to show the Chart of Semi Log Scale (Logarithmic==True). The required final output should be as shown in following image:
TeeChart works fine with Logarithmic Scale, but it does not show axis labels as shown in above image.
Following is the image showing TeeChart with Logarithmic=True:
Semi Log Scale [Axis Labeling]
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Semi Log Scale [Axis Labeling]
Hello,
There are several ways to control axis labelling, two of which are shown here:
Do either of these strategies help you?
There are several ways to control axis labelling, two of which are shown here:
Code: Select all
FastLine series1 = new FastLine();
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(series1);
series1.VertAxis = VerticalAxis.Right;
Random rnd = new Random();
for (int i = 0; i < 200; i++)
{
series1.Add(i, rnd.Next(10000));
}
tChart1.Axes.Right.Increment = 500;
//tChart1.GetNextAxisLabel += tChart1_GetNextAxisLabel;
tChart1.Axes.Right.Logarithmic = true;
}
void tChart1_GetNextAxisLabel(object sender, GetNextAxisLabelEventArgs e)
{
if (((Steema.TeeChart.Axis)sender).Equals(tChart1.Axes.Right))
{
e.Stop = false;
switch (e.LabelIndex)
{
case 0:
e.LabelValue = 50;
break;
case 1:
e.LabelValue = 100;
break;
case 2:
e.LabelValue = 200;
break;
case 3:
e.LabelValue = 500;
break;
case 4:
e.LabelValue = 1000;
break;
case 5:
e.LabelValue = 2000;
break;
case 6:
e.LabelValue = 5000;
break;
case 7:
e.LabelValue = 10000;
break;
default:
e.Stop = true;
break;
}
}
}
Best Regards,
Christopher Ireland / 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 |