multiplier or scale values

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

multiplier or scale values

Post by Stacey » Tue Apr 27, 2004 4:21 pm

I have a TimeSeriesCollection of TimeSeriesDataItems in which I have values, for example, 1, 2, 3, 4, 5. And I want to apply a multiplier to the values such as multiplier= 10 so values become 10, 20, 30, 40, 50 on the (line) chart instead of 1, 2, 3, 4, 5.

Is there any functionality in jfreechart that allows for a multiplier or scaling to be applied to the values in TimeSeriesDataItem with out having to overwrite each dataItem value directly?

Thanks, Stacey

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 » Tue Apr 27, 2004 4:28 pm

No, but you could write a wrapper class that implements the XYDataset interface, holds an internal XYDataset, and returns y values from the internal dataset multiplied by 10.
David Gilbert
JFreeChart Project Leader

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

Locked