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


Java BoxAndWhiskerXYDataset类代码示例

本文整理汇总了Java中org.jfree.data.statistics.BoxAndWhiskerXYDataset的典型用法代码示例。如果您正苦于以下问题:Java BoxAndWhiskerXYDataset类的具体用法?Java BoxAndWhiskerXYDataset怎么用?Java BoxAndWhiskerXYDataset使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code> permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return a box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
                                                  String timeAxisLabel,
                                                  String valueAxisLabel,
                                                  BoxAndWhiskerXYDataset dataset,
                                                  boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);

    return chart;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:28,代码来源:ChartFactory.java

示例2: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the {@link MessageFormat} class
 * for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return the items (never <code>null</code>).
 */
protected Object[] createItemArray(XYDataset dataset, int series, int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getSeriesName(series);
    Number x = dataset.getX(series, item);
    if (getXDateFormat() != null) {
        result[1] = getXDateFormat().format(new Date(x.longValue()));   
    }
    else {
        result[1] = getXFormat().format(x);
    }
    NumberFormat formatter = getYFormat();
    
    if (dataset instanceof BoxAndWhiskerXYDataset) {
        BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:34,代码来源:BoxAndWhiskerXYToolTipGenerator.java

示例3: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code> 
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code> 
 *                        permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
                                             String timeAxisLabel,
                                             String valueAxisLabel,
                                             BoxAndWhiskerXYDataset dataset,
                                             boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, 
            legend);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:29,代码来源:ChartFactory.java

示例4: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the 
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never <code>null</code>).
 */
protected Object[] createItemArray(XYDataset dataset, int series, 
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getSeriesKey(series).toString();
    Number x = dataset.getX(series, item);
    if (getXDateFormat() != null) {
        result[1] = getXDateFormat().format(new Date(x.longValue()));   
    }
    else {
        result[1] = getXFormat().format(x);
    }
    NumberFormat formatter = getYFormat();
    
    if (dataset instanceof BoxAndWhiskerXYDataset) {
        BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:35,代码来源:BoxAndWhiskerXYToolTipGenerator.java

示例5: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code>
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code>
 *                        permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String timeAxisLabel, String valueAxisLabel,
        BoxAndWhiskerXYDataset dataset, boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:29,代码来源:ChartFactory.java

示例6: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never <code>null</code>).
 */
@Override
protected Object[] createItemArray(XYDataset dataset, int series,
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getSeriesKey(series).toString();
    Number x = dataset.getX(series, item);
    if (getXDateFormat() != null) {
        result[1] = getXDateFormat().format(new Date(x.longValue()));
    }
    else {
        result[1] = getXFormat().format(x);
    }
    NumberFormat formatter = getYFormat();

    if (dataset instanceof BoxAndWhiskerXYDataset) {
        BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:36,代码来源:BoxAndWhiskerXYToolTipGenerator.java

示例7: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title ({@code null} permitted).
 * @param timeAxisLabel  a label for the time axis ({@code null}
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis ({@code null}
 *                        permitted).
 * @param dataset  the dataset for the chart ({@code null} permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String timeAxisLabel, String valueAxisLabel,
        BoxAndWhiskerXYDataset dataset, boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:29,代码来源:ChartFactory.java

示例8: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset ({@code null} not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never {@code null}).
 */
@Override
protected Object[] createItemArray(XYDataset dataset, int series,
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getSeriesKey(series).toString();
    Number x = dataset.getX(series, item);
    if (getXDateFormat() != null) {
        result[1] = getXDateFormat().format(new Date(x.longValue()));
    }
    else {
        result[1] = getXFormat().format(x);
    }
    NumberFormat formatter = getYFormat();

    if (dataset instanceof BoxAndWhiskerXYDataset) {
        BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:36,代码来源:BoxAndWhiskerXYToolTipGenerator.java

示例9: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code>
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code>
 *                        permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
                                             String timeAxisLabel,
                                             String valueAxisLabel,
                                             BoxAndWhiskerXYDataset dataset,
                                             boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:31,代码来源:ChartFactory.java

示例10: createItemArray

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
/**
 * Creates the array of items that can be passed to the
 * {@link MessageFormat} class for creating labels.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The items (never <code>null</code>).
 */
protected Object[] createItemArray(XYDataset dataset, int series,
                                   int item) {
    Object[] result = new Object[8];
    result[0] = dataset.getSeriesKey(series).toString();
    Number x = dataset.getX(series, item);
    if (getXDateFormat() != null) {
        result[1] = getXDateFormat().format(new Date(x.longValue()));
    }
    else {
        result[1] = getXFormat().format(x);
    }
    NumberFormat formatter = getYFormat();

    if (dataset instanceof BoxAndWhiskerXYDataset) {
        BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset;
        result[2] = formatter.format(d.getMeanValue(series, item));
        result[3] = formatter.format(d.getMedianValue(series, item));
        result[4] = formatter.format(d.getMinRegularValue(series, item));
        result[5] = formatter.format(d.getMaxRegularValue(series, item));
        result[6] = formatter.format(d.getQ1Value(series, item));
        result[7] = formatter.format(d.getQ3Value(series, item));
    }
    return result;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:35,代码来源:BoxAndWhiskerXYToolTipGenerator.java

示例11: createChart

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
public JFreeChart createChart() {
    JFreeChart chart;
    if (getDataset() instanceof BoxAndWhiskerXYDataset) {
        chart = ChartFactory.createBoxAndWhiskerChart(getTitle(),
            getTimeAxisLabel(), getValueAxisLabel(), 
            (BoxAndWhiskerXYDataset)getDataset(),  isLegend());
    }
    else {
        chart = ChartFactory.createBoxAndWhiskerChart(getTitle(),
            getTimeAxisLabel(), getValueAxisLabel(), 
            (BoxAndWhiskerCategoryDataset)getDataset(),  isLegend());            
    }
    return setExtraProperties(chart); 
}
 
开发者ID:davetcc,项目名称:groovychart,代码行数:15,代码来源:BoxAndWhiskerChart.java

示例12: getBoxAndWhiskerXYDataset

import org.jfree.data.statistics.BoxAndWhiskerXYDataset; //导入依赖的package包/类
public BoxAndWhiskerXYDataset getBoxAndWhiskerXYDataset()
{
 return this.vBoxAndWhiskerXYDataset;
}
 
开发者ID:Wizzercn,项目名称:NutzCodematic,代码行数:5,代码来源:FreeChart.java


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