当前位置: 首页>>代码示例>>Java>>正文


Java TableXYDataset.getSeriesCount方法代码示例

本文整理汇总了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);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:40,代码来源:DatasetUtilities.java

示例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;   
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:46,代码来源:DatasetUtilities.java

示例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;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:DatasetUtilities.java

示例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;
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:44,代码来源:DatasetUtilities.java

示例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;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:23,代码来源:DatasetUtilities.java

示例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;
    }
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:44,代码来源:DatasetUtils.java

示例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;
    }
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:46,代码来源:DatasetUtilities.java


注:本文中的org.jfree.data.xy.TableXYDataset.getSeriesCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。