Hi,
for one of our customers I have to programm different views of his series. The Axis must in one case be double logarithmic, and in another it has to follow a delicate formula to calculate the steps and increments.
Is there any way to do this?
If there is no other possibility I can transform the Values to display in the desired Form, but in this case the Axis Labels will not display the correct values.
Is there any possibility to "correct" the Labels?
Best regards,
Pekai
Double Logarithmic and other Axis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Pekai,
Axis are fully customizable. You can set the increments you need. You can also set the minimum and maximum values as other arguments.
You can also only show the labels you want using custom axis labels. There is an example of this at the TeeChart for .NET demo which comes with the installer and can found at the Start Menu\Programs\ TeeChart folder. The example to search for is called "custom labels"
Axis are fully customizable. You can set the increments you need. You can also set the minimum and maximum values as other arguments.
You can also only show the labels you want using custom axis labels. There is an example of this at the TeeChart for .NET demo which comes with the installer and can found at the Start Menu\Programs\ TeeChart folder. The example to search for is called "custom labels"
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 |
Increment and Min, Max is not enough
Hi,
thanks for the answer, but I think Min/Max and an increment ist not enough. The "Increment" is different for every step. The axis values must be completely set by a complex formula.
It would be nice to inherit from the axis class and to override the CalcYPosValue or CalcXPosValue. But they are not virtual.
Anybody an solution for this?
thanks for the answer, but I think Min/Max and an increment ist not enough. The "Increment" is different for every step. The axis values must be completely set by a complex formula.
It would be nice to inherit from the axis class and to override the CalcYPosValue or CalcXPosValue. But they are not virtual.
Anybody an solution for this?
Hi.
Using custom axis labels you can calculate desired axis increments and (visible) labels and then pass them to chart axis. The following code demonstrates how to add custom axis labels to log-axis:
Of course, this is only an example, you can use much more complex code to calculate custom axis increments (for each step) and axis labels you want to display (based on axis minimum and maximum value). The big advantage of this approach is you can fully customize increment(s) and axis labels.
Using custom axis labels you can calculate desired axis increments and (visible) labels and then pass them to chart axis. The following code demonstrates how to add custom axis labels to log-axis:
Code: Select all
tChart1.Axes.Left.Logarithmic = true;
tChart1.Axes.Left.SetMinMax(0.1,10);
Steema.TeeChart.AxisLabels labels = tChart1.Axes.Left.Labels;
labels.Items.Clear();
// decade 1e-1 to 1e+0
labels.Items.Add(0.1);
labels.Items.Add(0.2);
labels.Items.Add(0.3);
labels.Items.Add(0.45);
labels.Items.Add(0.6);
labels.Items.Add(0.75);
// decade 1e+0 to 1e+1
labels.Items.Add(1.0);
labels.Items.Add(2.0);
labels.Items.Add(3.0);
labels.Items.Add(4.5);
labels.Items.Add(6.0);
labels.Items.Add(7.5);
labels.Items.Add(10.0);
Marjan Slatinek,
http://www.steema.com
http://www.steema.com