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


Java XYAreaRenderer.AREA属性代码示例

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


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

示例1: createXYAreaChart

/**
 * Creates an area chart using an {@link XYDataset}.
 * <P>
 * The chart object returned by this method uses an {@link XYPlot} instance
 * as the plot, with a {@link NumberAxis} for the domain axis, a
 * {@link NumberAxis} as the range axis, and a {@link XYAreaRenderer} as
 * the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param xAxisLabel  a label for the X-axis (<code>null</code> permitted).
 * @param yAxisLabel  a label for the Y-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 An XY area chart.
 */
public static JFreeChart createXYAreaChart(String title, String xAxisLabel,
        String yAxisLabel, XYDataset dataset, boolean legend) {

    NumberAxis xAxis = new NumberAxis(xAxisLabel);
    xAxis.setAutoRangeIncludesZero(false);
    NumberAxis yAxis = new NumberAxis(yAxisLabel);
    XYPlot plot = new XYPlot(dataset, xAxis, yAxis, null);
    plot.setForegroundAlpha(0.5f);
    XYAreaRenderer renderer = new XYAreaRenderer(XYAreaRenderer.AREA);
    renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
    plot.setRenderer(renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:33,代码来源:ChartFactory.java

示例2: createTimeAreaChart

/**
 * Generates a generic Time Area Chart.
 *
 * @param title      the title of the Chart.
 * @param valueLabel the Y Axis label.
 * @param data       the data to populate with.
 * @return the generated Chart.
 */
private JFreeChart createTimeAreaChart(String title, String color, String valueLabel, XYDataset data) {
    PlotOrientation orientation = PlotOrientation.VERTICAL;

    DateAxis xAxis = generateTimeAxis();

    NumberAxis yAxis = new NumberAxis(valueLabel);

    NumberFormat formatter = NumberFormat.getNumberInstance(JiveGlobals.getLocale());
    formatter.setMaximumFractionDigits(2);
    formatter.setMinimumFractionDigits(0);
    yAxis.setNumberFormatOverride(formatter);

    XYAreaRenderer renderer = new XYAreaRenderer(XYAreaRenderer.AREA);
    renderer.setOutline(true);

    return createChart(title, data, xAxis, yAxis, orientation, renderer,
            GraphDefinition.getDefinition(color));
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:26,代码来源:GraphEngine.java

示例3: SquareXYAreaRenderer

public SquareXYAreaRenderer(XYAreaRenderer parent)
{
	super(XYAreaRenderer.AREA, parent.getBaseToolTipGenerator(), parent.getURLGenerator());
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:4,代码来源:EyeCandySixtiesChartTheme.java


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