java - JFreeChart using shifting one series by a given offset value -


let's assume have 1 instance of org.jfree.data.xy.defaultxydataset , adding 2 series in way:

dataset.addseries(name, values); dataset.addseries(name2, values) 

how can move first or second series x or y offset value?

assume offset >= 0. moving 'right' mean each (x,y) point transform (x + offset, y) point.

moving 'left', 'up' , 'down' analogy.

defaultxydataset convenient accessing individual elements of different series, doesn't expose methods needed manipulate internal data structures in way. instead, implement xydataset interface extending abstractxydataset, shown here, can encapsulate offset plumbing. may want @ slidingxydataset, cited here.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -