Hi,
In my appliication. I use custom axis . The scale of left axes is different than y axis. I have a problem that data on left axis have value which are comparatively smaller than that of right axes as a result the data drawn on left axes appear quite smaller than right axes. so i decided to convert values to log10 but i found that the axes coordinates also showed converted values which were of no significance to users.
Is it possible that i can have the data plotted on logarthmic scale but the axes coordinates still display real unconverted values.
Thanks,
Sachin
Logarthmic datapoints in Tchart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sachin,
Yes, you can set labels format and also customize them using GetAxisLabel event. For more information please read Tutorial 4 - Axis Control. Tutorials are available at TeeChart's program group.
Hope this helps!
Yes, you can set labels format and also customize them using GetAxisLabel event. For more information please read Tutorial 4 - Axis Control. Tutorials are available at TeeChart's program group.
Hope this helps!
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 |
Logarthmic datapoints in Tchart
Hi Narcis,
I think you misunderstood me. I am not concerned about label format but the values on the axes are logarthmic values which are plotted on the chart. I wanted the chart should be drawn using the logarthmic values & Axis should display real values.
for eg ( consider I draw a line with 3 points on chart for log(10), log(15) and log(20). I want the scale values on axis to be 10,15 and 20 but the line to be drawn with their logarthmic value.
I hope this is clear.
Thanks,
Sachin
I think you misunderstood me. I am not concerned about label format but the values on the axes are logarthmic values which are plotted on the chart. I wanted the chart should be drawn using the logarthmic values & Axis should display real values.
for eg ( consider I draw a line with 3 points on chart for log(10), log(15) and log(20). I want the scale values on axis to be 10,15 and 20 but the line to be drawn with their logarthmic value.
I hope this is clear.
Thanks,
Sachin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sachin,
In that case you can use the GetAxisLabel event like this:
In that case you can use the GetAxisLabel event like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Axes.Left.Logarithmic = true;
tChart1.Axes.Left.LogarithmicBase = Math.E;
tChart1.Axes.Left.Increment = 0.1;
tChart1.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Add(Math.Log(10));
line1.Add(Math.Log(15));
line1.Add(Math.Log(20));
tChart1.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(tChart1_GetAxisLabel);
}
void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (sender.Equals(tChart1.Axes.Left))
{
double tmp = Convert.ToDouble(e.LabelText);
e.LabelText = Math.Pow(Math.E, tmp).ToString("##");
}
}
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 |