本文整理汇总了Java中org.jfree.data.general.DatasetUtilities.findCumulativeRangeBounds方法的典型用法代码示例。如果您正苦于以下问题:Java DatasetUtilities.findCumulativeRangeBounds方法的具体用法?Java DatasetUtilities.findCumulativeRangeBounds怎么用?Java DatasetUtilities.findCumulativeRangeBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.general.DatasetUtilities
的用法示例。
在下文中一共展示了DatasetUtilities.findCumulativeRangeBounds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCumulativeRange2
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* A further test for the cumulative range calculation.
*/
public void testCumulativeRange2() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(-21.4, "Series 1", "Start Value");
dataset.addValue(11.57, "Series 1", "Delta 1");
dataset.addValue(3.51, "Series 1", "Delta 2");
dataset.addValue(-12.36, "Series 1", "Delta 3");
dataset.addValue(3.39, "Series 1", "Delta 4");
dataset.addValue(38.68, "Series 1", "Delta 5");
dataset.addValue(-43.31, "Series 1", "Delta 6");
dataset.addValue(-29.59, "Series 1", "Delta 7");
dataset.addValue(35.30, "Series 1", "Delta 8");
dataset.addValue(5.0, "Series 1", "Delta 9");
Range range = DatasetUtilities.findCumulativeRangeBounds(dataset);
assertEquals(-49.51, range.getLowerBound(), 0.00000001);
assertEquals(23.39, range.getUpperBound(), 0.00000001);
}
示例2: testCumulativeRange1
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* A simple test for the cumulative range calculation. The sequence of
* "cumulative" values are considered to be { 0.0, 10.0, 25.0, 18.0 } so
* the range should be 0.0 -> 25.0.
*/
public void testCumulativeRange1() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(10.0, "Series 1", "Start");
dataset.addValue(15.0, "Series 1", "Delta 1");
dataset.addValue(-7.0, "Series 1", "Delta 2");
Range range = DatasetUtilities.findCumulativeRangeBounds(dataset);
assertEquals(0.0, range.getLowerBound(), 0.00000001);
assertEquals(25.0, range.getUpperBound(), 0.00000001);
}
示例3: findRangeBounds
import org.jfree.data.general.DatasetUtilities; //导入方法依赖的package包/类
/**
* Returns the range of values the renderer requires to display all the
* items from the specified dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The range (or <code>null</code> if the dataset is empty).
*/
public Range findRangeBounds(CategoryDataset dataset) {
return DatasetUtilities.findCumulativeRangeBounds(dataset);
}