DatasetUtilities.iterateDomainBounds() versus iterateDomainB

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
olbrich
Posts: 19
Joined: Fri Dec 27, 2013 9:39 am
antibot: No, of course not.

DatasetUtilities.iterateDomainBounds() versus iterateDomainB

Post by olbrich » Fri Sep 18, 2015 2:54 pm

Hi David,

autoScaling for IntervalXYDataset seams to have a bug, doesnt it?

DatasetUtilities.iterateDomainBounds() takes all three values into consideration, but
iterateToFindDomainBounds() doesnt.

1. Why those differences in two methods?
2. ok, if IntervalXYZDataset implies getStartXValue() must be y<= getXValue() <= getEndXValue()
then everything would be ok too.

A little change of some lines in iterateToFindDomainBounds() would help.

best regards
markus

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

Re: DatasetUtilities.iterateDomainBounds() versus iterateDom

Post by david.gilbert » Mon Sep 21, 2015 8:19 pm

Hi,

It looks like you have spotted a bug. The two methods should give identical results when all series are visible, but as you noted the latter assumes that the x-value is always constrained within the interval...which is wrong. I will create a couple of JUnit tests for this and fix it for the next release. I guess I should check the methods for the rangeBounds also. :-)
David Gilbert
JFreeChart Project Leader

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

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

Re: DatasetUtilities.iterateDomainBounds() versus iterateDom

Post by david.gilbert » Tue Sep 22, 2015 4:43 pm

David Gilbert
JFreeChart Project Leader

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

Locked