Timeseries-points at the edge are partly displayed

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
vickysurya

Timeseries-points at the edge are partly displayed

Post by vickysurya » Tue Oct 18, 2005 12:59 pm

Hi,

In the timeseries chart some of the points which are at the boundry of the chart are partly displayed.

example - If the max value of y axis is say 350 and one of my records has a value greater then 350 then while diplaying,the point is partially hidden by the boundry of the chart.

Any idea how to solve this :?: [/img]

dhchou
Posts: 138
Joined: Tue Jul 05, 2005 11:01 pm

Post by dhchou » Tue Oct 18, 2005 2:10 pm

Have you tried applying

setRange(double lower, double upper)

method to your axis?

Daniel

wzwei28
Posts: 105
Joined: Wed Mar 16, 2005 9:17 am
Location: Malaysia, Earth
Contact:

Post by wzwei28 » Fri Nov 18, 2005 10:09 am

Version:jfreechart-1.0.0-rc1

But this workaround got bugs when u try zoom in & then zoom back(for timeseries & OHLC candlestick(setAutoRangeIncludesZero(false)))...

The bugs is after user zoom in and zoom out, it will return to original autoRange.

This is because when user zoom in & zoom out. In the ChartPanel class ->mouseReleased(...)->restoreAutoBounds()->restoreAutoDomainBounds() .It will restore back auto mode.

Exp: when y-axis have data from 35-60, then when autorange will become 30-65, but after valueAxis.setRange(20,75) or valueAxis.setRangeWithMargins(20,75) , it can well showing 20 to 75 view but unfortunately after zoom out, it will return to auto mode. Because of somewhere calling setAutoRange(true) method in ValueAxis class : resizeRange(double percent, double anchorValue) method.

So, I am also searching for solution... :oops:

hiker
Posts: 3
Joined: Thu Aug 17, 2006 9:44 am
Location: Germany

Post by hiker » Mon Aug 21, 2006 10:39 am

well,
for me it worked with setting the setAutoRangeMinimumSize:

Code: Select all

double upperBound = rangeAxis.getUpperBound();
double lowerBound = rangeAxis.getLowerBound();
rangeAxis.setAutoRangeMinimumSize((upperBound - lowerBound));
after zooming out it has the same size than before.

Locked