Search found 16 matches
- Fri Sep 16, 2005 10:11 am
- Forum: JFreeChart
- Topic: Rangeaxis: Ticks not displayed...
- Replies: 9
- Views: 9006
Ok, I took a deeper look into the Numberaxis code myself and fixed the problem at last for my case. The thing was, that the calculateVisibleTickCount() method did return a wrong number. As I've had the same problem without using my custom axis I think it might be a general issue. Nevertheless, I've ...
- Mon Sep 12, 2005 11:01 am
- Forum: JFreeChart
- Topic: Great, but one more thing - Left Mouse on Chart
- Replies: 1
- Views: 2281
Add an own MouseListener to the chartpanel. If you want for instance the x and y value of the clicked position you could try this: myChartPanel.addMouseListener(new MouseAdapter(){ public void mouseClicked(java.awt.event.MouseEvent e) { long xval = Math.round(chart.getXYPlot().getDomainAxis().java2D...
- Mon Sep 12, 2005 10:55 am
- Forum: JFreeChart
- Topic: Line Chart-x&y axis doesn't seems to be starting at 0,0
- Replies: 3
- Views: 3198
Hi,
do you simply mean, that the y-axis starts at a point below 0.0 ?
If you meant that, that is probably due to the autorange behaviour of the chart.
You can set the axis lower bound value manually by typing:
I hope it helps,
regards,
christopher
do you simply mean, that the y-axis starts at a point below 0.0 ?
If you meant that, that is probably due to the autorange behaviour of the chart.
You can set the axis lower bound value manually by typing:
Code: Select all
axis.setLowerBound(0.0);
regards,
christopher
- Mon Sep 12, 2005 10:49 am
- Forum: JFreeChart
- Topic: Rangeaxis: Ticks not displayed...
- Replies: 9
- Views: 9006
- Fri Sep 09, 2005 3:01 pm
- Forum: JFreeChart
- Topic: Rangeaxis: Ticks not displayed...
- Replies: 9
- Views: 9006
Unfortunately, the code grew pretty large. I tried to compress it to the main commands: Basically, my data is stored in objects named trends, the graph is an XYPlot with a TimeSeriesCollection, each dataset holding exactly one series. The domainaxis is of type DateAxis while I use a custom extension...
- Fri Sep 09, 2005 11:51 am
- Forum: JFreeChart
- Topic: Changing the thickness of the line in Linechart
- Replies: 5
- Views: 5439
- Fri Sep 09, 2005 11:49 am
- Forum: JFreeChart
- Topic: Rangeaxis: Ticks not displayed...
- Replies: 9
- Views: 9006
- Thu Sep 08, 2005 10:40 am
- Forum: JFreeChart
- Topic: Rangeaxis: Ticks not displayed...
- Replies: 9
- Views: 9006
- Tue Sep 06, 2005 5:07 pm
- Forum: JFreeChart
- Topic: Rangeaxis: Ticks not displayed...
- Replies: 9
- Views: 9006
Rangeaxis: Ticks not displayed...
I've got a problem while specifying custom TickUnits on my rangeaxis. This works pretty well using this code: axis.setLowerBound(start); axis.setUpperBound(end); newRange = end-start; axis.setTickUnit(new NumberTickUnit(newRange / 10, doubleFormatter)); However, sometimes the labes are not painted u...
- Tue Sep 06, 2005 3:45 pm
- Forum: JFreeChart
- Topic: Bug in handling multiple renderer / axes
- Replies: 0
- Views: 1629
Bug in handling multiple renderer / axes
I guess I've found a bug or at least a missing functionality in the support of multiple renderer or axes: Assume the following situation: If you want to plot different objects that are ordered in a way that is reflected by an index number of the object. If you want to decide which of the objects to ...
- Mon Sep 05, 2005 2:46 pm
- Forum: JFreeChart
- Topic: Having trouble with MultiAxis Charts
- Replies: 4
- Views: 3574
Hi, I think your only defining one renderer for two series... You get the renderer by just calling plot.getRenderer() This way, you get two times the reference to the same renderer. Try using: r = plot.getRenderer(0); r2 = plot.getRenderer(1); This should do what you want. But note, that the rendere...
- Thu Sep 01, 2005 3:11 pm
- Forum: JFreeChart
- Topic: axis ticks move though they shouldn't
- Replies: 4
- Views: 6126
Grant! :D That's exactly the information I needed. Actually it was not the refreshTicks() method I had to adjust but rather the calculateLowestVisibleTickValue() method. So if anyone is interested on how to freeze the position of you tickunits on a range Numberaxis, here is the code that worked for ...
- Thu Sep 01, 2005 1:24 pm
- Forum: JFreeChart
- Topic: axis ticks move though they shouldn't
- Replies: 4
- Views: 6126
Here you go: http://www-lehre.inf.uos.de/~cloerken/dump/axis-shift.jpg The left image is the initial axis how it is displayed using the code of the first post. (range = 1.2) The second is after one y-axis zoom out step. Notice that the y-axis did in fact change the way I want it to behave. It shows ...
- Thu Sep 01, 2005 8:42 am
- Forum: JFreeChart
- Topic: Restricting Y-axis values
- Replies: 7
- Views: 5623
Hi Adnan, I'm afraid that, in your example, you can't... The axes are attached to the plot, not the Dataset. The structure is that you have the data in a series, the series in a Dataset, the Dataset in a plot and the plot in a chart. And as the axes are property of the plot you cannot specify them b...
- Wed Aug 31, 2005 4:53 pm
- Forum: JFreeChart
- Topic: Restricting Y-axis values
- Replies: 7
- Views: 5623
If you have a NumberAxis in your plot and assuming you have your y-axis try:
If you don't already have a reference to the axis, use the getMethods provided by the plot your using.
Cheers Christopher
Code: Select all
yAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
Cheers Christopher