Hi,
Sorry to say that I am really confused with setIncrement, setMaximum and setMinimum for axis. It does not work as expected.
package com.amd.ngeda.chart.gallery.teechart;
import javax.swing.JFrame;
import javax.swing.JPanel;
import com.steema.teechart.TChart;
import com.steema.teechart.styles.FastLine;
public class TestTeeChart {
public static void main(String[] args) {
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setSize(600, 600);
TChart chart = new TChart();
chart.getAxes().getBottom().getLabels().setValueFormat("0.00E0");
panel.add(chart);
FastLine fastLine = new FastLine(chart.getChart());
for (int i = 0; i < 100; i++) {
fastLine.add(i, i * i);
}
chart.getAxes().getBottom().setAutomatic(false);
chart.getAxes().getBottom().setIncrement(10);
chart.getAxes().getBottom().setMaximum(200.0);
chart.getAxes().getBottom().setMinimum(1.0);
frame.add(panel);
frame.setSize(600, 600);
frame.setVisible(true);
}
}
If you run the program then you will see that only setmaximum is applied to the chart. One more thing which I noticed was the issue with large values for increment. If we set large values for increment then all the axis labels are disappearing from the chart.
Could you please explain me the concept of increment, min and max ?
Thanks,
Varun
increment, max and min for axis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Varun,
That's not true, you'll see the difference if you use this:If you run the program then you will see that only setmaximum is applied to the chart.
Code: Select all
chart.getAxes().getBottom().setMinimum(10.0);
This happens when you manually set an increment larger than the axis range.One more thing which I noticed was the issue with large values for increment. If we set large values for increment then all the axis labels are disappearing from the chart.
You'll find information about this in Tutorial 4 - Axis Control. Tutorials can be found at TeeChart's "Docs" folder.Could you please explain me the concept of increment, min and max ?
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 |