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


Java TableXYDataset.getYValue方法代码示例

本文整理汇总了Java中org.jfree.data.xy.TableXYDataset.getYValue方法的典型用法代码示例。如果您正苦于以下问题:Java TableXYDataset.getYValue方法的具体用法?Java TableXYDataset.getYValue怎么用?Java TableXYDataset.getYValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.data.xy.TableXYDataset的用法示例。


在下文中一共展示了TableXYDataset.getYValue方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStackValues

import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
 * Calculates the stacked values (one positive and one negative) of all 
 * series up to, but not including, <code>series</code> for the specified 
 * item. It returns [0.0, 0.0] if <code>series</code> is the first series.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series index.
 * @param index  the item index.
 *
 * @return An array containing the cumulative negative and positive values
 *     for all series values up to but excluding <code>series</code> 
 *     for <code>index</code>.
 */
private double[] getStackValues(TableXYDataset dataset, 
                                int series, int index) {
    double[] result = new double[2];
    for (int i = 0; i < series; i++) {
        double v = dataset.getYValue(i, index);
        if (!Double.isNaN(v)) {
            if (v >= 0.0) {
                result[1] += v;   
            }
            else {
                result[0] += v;   
            }
        }
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:StackedXYAreaRenderer2.java

示例2: getStackValues

import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
 * Calculates the stacked values (one positive and one negative) of all
 * series up to, but not including, <code>series</code> for the specified
 * item. It returns [0.0, 0.0] if <code>series</code> is the first series.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series index.
 * @param index  the item index.
 *
 * @return An array containing the cumulative negative and positive values
 *     for all series values up to but excluding <code>series</code>
 *     for <code>index</code>.
 */
private double[] getStackValues(TableXYDataset dataset,
                                int series, int index) {
    double[] result = new double[2];
    for (int i = 0; i < series; i++) {
        double v = dataset.getYValue(i, index);
        if (!Double.isNaN(v)) {
            if (v >= 0.0) {
                result[1] += v;
            }
            else {
                result[0] += v;
            }
        }
    }
    return result;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:30,代码来源:StackedXYAreaRenderer2.java

示例3: getStackValues

import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
 * Calculates the stacked values (one positive and one negative) of all
 * series up to, but not including, {@code series} for the specified
 * item. It returns [0.0, 0.0] if {@code series} is the first series.
 *
 * @param dataset  the dataset ({@code null} not permitted).
 * @param series  the series index.
 * @param index  the item index.
 *
 * @return An array containing the cumulative negative and positive values
 *     for all series values up to but excluding {@code series}
 *     for {@code index}.
 */
private double[] getStackValues(TableXYDataset dataset,
                                int series, int index) {
    double[] result = new double[2];
    for (int i = 0; i < series; i++) {
        double v = dataset.getYValue(i, index);
        if (!Double.isNaN(v)) {
            if (v >= 0.0) {
                result[1] += v;
            }
            else {
                result[0] += v;
            }
        }
    }
    return result;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:30,代码来源:StackedXYAreaRenderer2.java

示例4: 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

示例5: 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

示例6: 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

示例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) {
    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

示例8: 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

示例9: 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

示例10: 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

示例11: getPreviousHeight

import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
 * Calculates the stacked value of the all series up to, but not including 
 * <code>series</code> for the specified item. It returns 0.0 if 
 * <code>series</code> is the first series, i.e. 0.
 *
 * @param dataset  the dataset.
 * @param series  the series.
 * @param index  the index.
 *
 * @return The cumulative value for all series' values up to but excluding 
 *         <code>series</code> for <code>index</code>.
 */
protected double getPreviousHeight(TableXYDataset dataset, 
                                   int series, int index) {
    double result = 0.0;
    for (int i = 0; i < series; i++) {
        double value = dataset.getYValue(i, index);
        if (!Double.isNaN(value)) {
            result += value;
        }
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:StackedXYAreaRenderer.java

示例12: getPreviousHeight

import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
 * Calculates the stacked value of the all series up to, but not including
 * <code>series</code> for the specified item. It returns 0.0 if
 * <code>series</code> is the first series, i.e. 0.
 *
 * @param dataset  the dataset.
 * @param series  the series.
 * @param index  the index.
 *
 * @return The cumulative value for all series' values up to but excluding
 *         <code>series</code> for <code>index</code>.
 */
protected double getPreviousHeight(TableXYDataset dataset,
                                   int series, int index) {
    double result = 0.0;
    for (int i = 0; i < series; i++) {
        double value = dataset.getYValue(i, index);
        if (!Double.isNaN(value)) {
            result += value;
        }
    }
    return result;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:24,代码来源:StackedXYAreaRenderer.java

示例13: getPreviousHeight

import org.jfree.data.xy.TableXYDataset; //导入方法依赖的package包/类
/**
 * Calculates the stacked value of the all series up to, but not including
 * {@code series} for the specified item. It returns 0.0 if
 * {@code series} is the first series, i.e. 0.
 *
 * @param dataset  the dataset.
 * @param series  the series.
 * @param index  the index.
 *
 * @return The cumulative value for all series' values up to but excluding
 *         {@code series} for {@code index}.
 */
protected double getPreviousHeight(TableXYDataset dataset,
                                   int series, int index) {
    double result = 0.0;
    for (int i = 0; i < series; i++) {
        double value = dataset.getYValue(i, index);
        if (!Double.isNaN(value)) {
            result += value;
        }
    }
    return result;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:24,代码来源:StackedXYAreaRenderer.java


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