本文整理汇总了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;
}
示例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));
}
示例3: SquareXYAreaRenderer
public SquareXYAreaRenderer(XYAreaRenderer parent)
{
super(XYAreaRenderer.AREA, parent.getBaseToolTipGenerator(), parent.getURLGenerator());
}