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


Java BoxAndWhiskerRenderer.setBaseToolTipGenerator方法代码示例

本文整理汇总了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;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:35,代码来源:ChartFactory.java

示例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;
}
 
开发者ID:pegasystems,项目名称:pega-logviewer,代码行数:31,代码来源:LogViewerUtil.java

示例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;
}
 
开发者ID:adamIqbal,项目名称:Health,代码行数:15,代码来源:BoxPlot.java


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