the mehtod isHiddenValue() always returns false

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Muriel
Posts: 4
Joined: Mon Jul 12, 2004 8:30 am

the mehtod isHiddenValue() always returns false

Post by Muriel » Mon Jul 19, 2004 12:39 pm

I think I found a bug in the isHiddenValue() method of the DateAxis class.

This method always returns false. When debugging this method, it calls another method within the TimeLine class, called: containsDomainValue().
This method contains the following code:

Code: Select all

return true;
The reason for me to use this method is as follows.
I have a DateAxis on which I use the setMinimumDate() and setMaximumDate(). This allows me to specify a specific time span I want to see (even if my data contains more). Because I'm doing some proeccesing with the data I first want to check if the new data is within the visible scope of my axis. If true I can do my processing and if false I do not have to process it, because it's not visible on the axis. That's why I tought "isHiddenValue" would tell me if the new data is wihtin the visible time span or not.

Is there already a solutions for this 'bug', or am I making a mistake, or is there a workaround for me ?

Thanks so far,

Greetings Muriel

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Jul 19, 2004 12:44 pm

It is working the way it should, but the name of the method is confusing. I think I will rename it something like isExcludedValue(). It tells you whether the current timeline (which might be a segmented timeline) excludes that point from the axis (e.g. some timelines can exclude all weekend dates).

The default timeline doesn't exclude any dates, so the method will return false for all values in that case.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

ravik
Posts: 3
Joined: Fri Apr 21, 2006 9:18 am

how to represent using setMinimumDate(Date) of DateAxis?

Post by ravik » Thu May 11, 2006 11:48 am

Hi,

I want to show the monthly area graph.
The graph showing values with 3 days interval in X axis using new DateTickUnit(DateTickUnit.DAY,3). The above method shows the graph correctly with three days interval. But, the Tick statrs only Jan 3, Jan 6, Jan 9 etc. But, I want the date starts from Jan1. for that, i am using setMinimumDate of DateAxis method like setMinimumDate(dateAxis.getMinimumDate()). But, it is not working correctly. Again, it showing
Jan 3, Jan 6 like that only. But the getMinimumDate() returns Jan 1 correctly.
if anybody knows please help me. It is very urgent. Thanks in advance....



-- Ravik

Locked