hello,
I really need help, already searched a lot and found no solution.
I have a chart created as follows
ChartFactory.createXYLineChart ("Test", "Time (seconds)", "", dataSetCollection, PlotOrientation.VERTICAL, true, true, false);
I really need to put a horizontal scroll bar.
Can someone help me give a hint?
Scrollbar in a line chart
-
- Posts: 45
- Joined: Thu Jun 26, 2014 8:24 am
- antibot: No, of course not.
- Location: Germany, Aachen
Re: Scrollbar in a line chart
Have you tried to enclose it in a JScrollPane?
Re: Scrollbar in a line chart
yes I've tried.
The way I did not work. I added the chart on the scroll bar.
Have you done this?
The way I did not work. I added the chart on the scroll bar.
Have you done this?
Re: Scrollbar in a line chart
We need to see the code you used with the JScrollPane.
Re: Scrollbar in a line chart
I must be doing something very wrong.
The following is a simple example, when I give the zoom scroll bar does not appear.
The following is a simple example, when I give the zoom scroll bar does not appear.
Code: Select all
public Example() {
JPanel chartPanel = createChartPanel();
JScrollPane sPane = new JScrollPane(chartPanel);
add(sPane, BorderLayout.CENTER);
setSize(640, 480);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
}
Re: Scrollbar in a line chart
alguem?
Eu tentei adaptar os topicos abaixo, mas não obtive sucesso.
http://www.jfree.org/phpBB2/viewtopic.php?t=18917
http://www.jfree.org/phpBB2/viewtopic.php?t=6342
Eu tentei adaptar os topicos abaixo, mas não obtive sucesso.
http://www.jfree.org/phpBB2/viewtopic.php?t=18917
http://www.jfree.org/phpBB2/viewtopic.php?t=6342