本文整理汇总了Java中org.jfree.chart.renderer.category.BoxAndWhiskerRenderer.setBaseToolTipGenerator方法的典型用法代码示例。如果您正苦于以下问题:Java BoxAndWhiskerRenderer.setBaseToolTipGenerator方法的具体用法?Java BoxAndWhiskerRenderer.setBaseToolTipGenerator怎么用?Java BoxAndWhiskerRenderer.setBaseToolTipGenerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.category.BoxAndWhiskerRenderer
的用法示例。
在下文中一共展示了BoxAndWhiskerRenderer.setBaseToolTipGenerator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBoxAndWhiskerChart
import org.jfree.chart.renderer.category.BoxAndWhiskerRenderer; //导入方法依赖的package包/类
/**
* Creates and returns a default instance of a box and whisker chart
* based on data from a {@link BoxAndWhiskerCategoryDataset}.
*
* @param title the chart title (<code>null</code> permitted).
* @param categoryAxisLabel a label for the category 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.
*
* @since 1.0.4
*/
public static JFreeChart createBoxAndWhiskerChart(String title,
String categoryAxisLabel, String valueAxisLabel,
BoxAndWhiskerCategoryDataset dataset, boolean legend) {
CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(false);
BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
renderer.setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis,
renderer);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;
}
示例2: updateCategoryPlot
import org.jfree.chart.renderer.category.BoxAndWhiskerRenderer; //导入方法依赖的package包/类
public CategoryPlot updateCategoryPlot(CategoryPlot categoryPlot, NumberFormat numberFormat,
BoxAndWhiskerItem boxAndWhiskerItem, Color color, boolean notify) {
// Box and Whisker Plot
NumberAxis valueAxis = new NumberAxis();
valueAxis.setAutoRangeIncludesZero(false);
valueAxis.setNumberFormatOverride(numberFormat);
valueAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
BoxAndWhiskerRenderer boxAndWhiskerRenderer = new BoxAndWhiskerRenderer();
boxAndWhiskerRenderer.setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
boxAndWhiskerRenderer.setMaximumBarWidth(0.3);
boxAndWhiskerRenderer.setBasePaint(color);
boxAndWhiskerRenderer.setBaseOutlinePaint(color);
boxAndWhiskerRenderer.setAutoPopulateSeriesPaint(false);
boxAndWhiskerRenderer.setFillBox(false);
boxAndWhiskerRenderer.setUseOutlinePaintForWhiskers(true);
DefaultBoxAndWhiskerCategoryDataset dbawcd = new DefaultBoxAndWhiskerCategoryDataset();
dbawcd.add(boxAndWhiskerItem, "", "");
categoryPlot.setRenderer(boxAndWhiskerRenderer, notify);
categoryPlot.setRangeAxis(0, valueAxis, notify);
categoryPlot.setDataset(dbawcd);
return categoryPlot;
}
示例3: createRenderer
import org.jfree.chart.renderer.category.BoxAndWhiskerRenderer; //导入方法依赖的package包/类
/**
* Creates a Renderer object to that can draw the BoxPlot.
*
* @return a BoxAndWhiskerRenderer that can render the boxplot
*/
private static BoxAndWhiskerRenderer createRenderer(
final boolean meanVisible, final boolean fillBox) {
BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
renderer.setMeanVisible(meanVisible);
renderer.setFillBox(fillBox);
renderer.setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
return renderer;
}