本文整理汇总了Java中org.jfree.chart.renderer.xy.XYAreaRenderer.setBaseToolTipGenerator方法的典型用法代码示例。如果您正苦于以下问题:Java XYAreaRenderer.setBaseToolTipGenerator方法的具体用法?Java XYAreaRenderer.setBaseToolTipGenerator怎么用?Java XYAreaRenderer.setBaseToolTipGenerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.xy.XYAreaRenderer
的用法示例。
在下文中一共展示了XYAreaRenderer.setBaseToolTipGenerator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createXYAreaChart
import org.jfree.chart.renderer.xy.XYAreaRenderer; //导入方法依赖的package包/类
/**
* 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
import org.jfree.chart.renderer.xy.XYAreaRenderer; //导入方法依赖的package包/类
private JFreeChart createTimeAreaChart(ReportChart reportChart, ChartValue[] values, boolean displayInline)
{
XYDataset dataset = createTimeDataset(values);
ValueAxis timeAxis = new DateAxis(reportChart.getXAxisLabel());
NumberAxis valueAxis = new NumberAxis(reportChart.getYAxisLabel());
XYAreaRenderer renderer = new XYAreaRenderer();
renderer.setBaseToolTipGenerator(StandardXYToolTipGenerator.getTimeSeriesInstance());
if (reportChart.getDrillDownReport() != null)
{
renderer.setURLGenerator(new TimeSeriesURLGenerator(
"executeReport.action?displayInline=" + displayInline
+ "&exportType=0&reportId="
+ reportChart.getDrillDownReport().getId(), "series",
ReportChart.DRILLDOWN_PARAMETER));
}
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
plot.setOrientation(PlotOrientation.VERTICAL);
if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
{
plot.setOrientation(PlotOrientation.HORIZONTAL);
}
JFreeChart chart = new JFreeChart(reportChart.getTitle(), JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend());
return chart;
}
示例3: createXYAreaChart
import org.jfree.chart.renderer.xy.XYAreaRenderer; //导入方法依赖的package包/类
private JFreeChart createXYAreaChart(ReportChart reportChart, ChartValue[] values, boolean displayInline)
{
XYDataset dataset = createXYDataset(values);
NumberAxis xAxis = new NumberAxis(reportChart.getXAxisLabel());
xAxis.setAutoRangeIncludesZero(false);
NumberAxis yAxis = new NumberAxis(reportChart.getYAxisLabel());
XYAreaRenderer renderer = new XYAreaRenderer();
renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
if (reportChart.getDrillDownReport() != null)
{
renderer.setURLGenerator(new XYURLGenerator(
"executeReport.action?displayInline=" + displayInline
+ "&exportType=0&reportId="
+ reportChart.getDrillDownReport().getId(), "series",
ReportChart.DRILLDOWN_PARAMETER));
}
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
plot.setForegroundAlpha(0.5F);
plot.setOrientation(PlotOrientation.VERTICAL);
if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
{
plot.setOrientation(PlotOrientation.HORIZONTAL);
}
JFreeChart chart = new JFreeChart(reportChart.getTitle(),
JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend());
return chart;
}
示例4: createTimeAreaChart
import org.jfree.chart.renderer.xy.XYAreaRenderer; //导入方法依赖的package包/类
private JFreeChart createTimeAreaChart(ReportChart reportChart, ChartValue[] values, boolean displayInline)
{
XYDataset dataset = createTimeDataset(values);
ValueAxis timeAxis = new DateAxis(reportChart.getXAxisLabel());
NumberAxis valueAxis = new NumberAxis(reportChart.getYAxisLabel());
XYAreaRenderer renderer = new XYAreaRenderer();
renderer.setBaseToolTipGenerator(StandardXYToolTipGenerator.getTimeSeriesInstance());
if (reportChart.getDrillDownReport() != null)
{
renderer.setURLGenerator(new TimeSeriesURLGenerator(
"executeReport.action?displayInline=" + displayInline
+ "&exportType=0&reportId="
+ reportChart.getDrillDownReport().getId(), "series",
ReportChart.DRILLDOWN_PARAMETER));
}
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
plot.setOrientation(PlotOrientation.VERTICAL);
if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
{
plot.setOrientation(PlotOrientation.HORIZONTAL);
}
JFreeChart chart = new JFreeChart(reportChart.getTitle(), JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend());
return chart;
}
示例5: createXYAreaChart
import org.jfree.chart.renderer.xy.XYAreaRenderer; //导入方法依赖的package包/类
private JFreeChart createXYAreaChart(ReportChart reportChart, ChartValue[] values, boolean displayInline)
{
XYDataset dataset = createXYDataset(values);
NumberAxis xAxis = new NumberAxis(reportChart.getXAxisLabel());
xAxis.setAutoRangeIncludesZero(false);
NumberAxis yAxis = new NumberAxis(reportChart.getYAxisLabel());
XYAreaRenderer renderer = new XYAreaRenderer();
renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
if (reportChart.getDrillDownReport() != null)
{
renderer.setURLGenerator(new XYURLGenerator(
"executeReport.action?displayInline=" + displayInline
+ "&exportType=0&reportId="
+ reportChart.getDrillDownReport().getId(), "series",
ReportChart.DRILLDOWN_PARAMETER));
}
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
plot.setForegroundAlpha(0.5F);
plot.setOrientation(PlotOrientation.VERTICAL);
if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
{
plot.setOrientation(PlotOrientation.HORIZONTAL);
}
JFreeChart chart = new JFreeChart(reportChart.getTitle(),
JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend());
return chart;
}