本文整理汇总了Java中org.jfree.data.xy.TableXYDataset.getSeriesCount方法的典型用法代码示例。如果您正苦于以下问题:Java TableXYDataset.getSeriesCount方法的具体用法?Java TableXYDataset.getSeriesCount怎么用?Java TableXYDataset.getSeriesCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.xy.TableXYDataset
的用法示例。
在下文中一共展示了TableXYDataset.getSeriesCount方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findStackedRangeExtent
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range,
* assuming that the series are stacked, using the specified base value.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param base the base value.
*
* @return The range.
*/
public static Range findStackedRangeExtent(TableXYDataset dataset, double base) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) {
double positive = base;
double negative = base;
for (int seriesNo = 0; seriesNo < dataset.getSeriesCount(); seriesNo++) {
double y = dataset.getYValue(seriesNo, itemNo);
if (!Double.isNaN(y)) {
if (y > 0.0) {
positive += y;
}
else {
negative += y;
}
}
}
if (positive > maximum) {
maximum = positive;
}
if (negative < minimum) {
minimum = negative;
}
}
return new Range(minimum, maximum);
}
示例2: findStackedRangeBounds
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range,
* assuming that the series are stacked, using the specified base value.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param base the base value.
*
* @return The range (<code>null</code> if the dataset contains no values).
*/
public static Range findStackedRangeBounds(TableXYDataset dataset,
double base) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
double minimum = base;
double maximum = base;
for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) {
double positive = base;
double negative = base;
int seriesCount = dataset.getSeriesCount();
for (int seriesNo = 0; seriesNo < seriesCount; seriesNo++) {
double y = dataset.getYValue(seriesNo, itemNo);
if (!Double.isNaN(y)) {
if (y > 0.0) {
positive += y;
}
else {
negative += y;
}
}
}
if (positive > maximum) {
maximum = positive;
}
if (negative < minimum) {
minimum = negative;
}
}
if (minimum <= maximum) {
return new Range(minimum, maximum);
}
else {
return null;
}
}
示例3: calculateStackTotal
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Calculates the total for the y-values in all series for a given item
* index.
*
* @param dataset the dataset.
* @param item the item index.
*
* @return The total.
*
* @since 1.0.5
*/
public static double calculateStackTotal(TableXYDataset dataset, int item) {
double total = 0.0;
int seriesCount = dataset.getSeriesCount();
for (int s = 0; s < seriesCount; s++) {
double value = dataset.getYValue(s, item);
if (!Double.isNaN(value)) {
total = total + value;
}
}
return total;
}
示例4: findStackedRangeBounds
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range,
* assuming that the series are stacked, using the specified base value.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param base the base value.
*
* @return The range (<code>null</code> if the dataset contains no values).
*/
public static Range findStackedRangeBounds(TableXYDataset dataset,
double base) {
ParamChecks.nullNotPermitted(dataset, "dataset");
double minimum = base;
double maximum = base;
for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) {
double positive = base;
double negative = base;
int seriesCount = dataset.getSeriesCount();
for (int seriesNo = 0; seriesNo < seriesCount; seriesNo++) {
double y = dataset.getYValue(seriesNo, itemNo);
if (!Double.isNaN(y)) {
if (y > 0.0) {
positive += y;
}
else {
negative += y;
}
}
}
if (positive > maximum) {
maximum = positive;
}
if (negative < minimum) {
minimum = negative;
}
}
if (minimum <= maximum) {
return new Range(minimum, maximum);
}
else {
return null;
}
}
示例5: calculateStackTotal
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Calculates the total for the y-values in all series for a given item
* index.
*
* @param dataset the dataset.
* @param item the item index.
*
* @return The total.
*
* @since 1.0.5
*/
public static double calculateStackTotal(TableXYDataset dataset, int item) {
double total = 0.0;
int seriesCount = dataset.getSeriesCount();
for (int s = 0; s < seriesCount; s++) {
double value = dataset.getYValue(s, item);
if (!Double.isNaN(value)) {
total = total + value;
}
}
return total;
}
示例6: findStackedRangeBounds
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range,
* assuming that the series are stacked, using the specified base value.
*
* @param dataset the dataset ({@code null} not permitted).
* @param base the base value.
*
* @return The range ({@code null} if the dataset contains no values).
*/
public static Range findStackedRangeBounds(TableXYDataset dataset,
double base) {
Args.nullNotPermitted(dataset, "dataset");
double minimum = base;
double maximum = base;
for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) {
double positive = base;
double negative = base;
int seriesCount = dataset.getSeriesCount();
for (int seriesNo = 0; seriesNo < seriesCount; seriesNo++) {
double y = dataset.getYValue(seriesNo, itemNo);
if (!Double.isNaN(y)) {
if (y > 0.0) {
positive += y;
}
else {
negative += y;
}
}
}
if (positive > maximum) {
maximum = positive;
}
if (negative < minimum) {
minimum = negative;
}
}
if (minimum <= maximum) {
return new Range(minimum, maximum);
}
else {
return null;
}
}
示例7: findStackedRangeBounds
import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
* Returns the minimum and maximum values for the dataset's range,
* assuming that the series are stacked, using the specified base value.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param base the base value.
*
* @return The range (<code>null</code> if the dataset contains no values).
*/
public static Range findStackedRangeBounds(TableXYDataset dataset,
double base) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
double minimum = base;
double maximum = base;
for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) {
double positive = base;
double negative = base;
int seriesCount = dataset.getSeriesCount();
for (int seriesNo = 0; seriesNo < seriesCount; seriesNo++) {
double y = dataset.getYValue(seriesNo, itemNo);
if (!Double.isNaN(y)) {
if (y > 0.0) {
positive += y;
}
else {
negative += y;
}
}
}
if (positive > maximum) {
maximum = positive;
}
if (negative < minimum) {
minimum = negative;
}
}
if (minimum <= maximum) {
return new Range(minimum, maximum);
}
else {
return null;
}
}