Example usage for org.jfree.chart.labels StandardXYSeriesLabelGenerator StandardXYSeriesLabelGenerator

List of usage examples for org.jfree.chart.labels StandardXYSeriesLabelGenerator StandardXYSeriesLabelGenerator

Introduction

In this page you can find the example usage for org.jfree.chart.labels StandardXYSeriesLabelGenerator StandardXYSeriesLabelGenerator.

Prototype

public StandardXYSeriesLabelGenerator(String format) 

Source Link

Document

Creates a new series label generator.

Usage

From source file:org.spf4j.perf.impl.chart.Charts.java

private static JFreeChart createJFreeChart(final String chartName, final String uom,
        final XYDataset timeseriescollection) {
    JFreeChart jfreechart = ChartFactory.createTimeSeriesChart(chartName, "Time", uom, timeseriescollection,
            true, true, false);// w w  w .j a v  a 2 s . c  o  m
    XYPlot xyplot = (XYPlot) jfreechart.getPlot();
    DateAxis dateaxis = (DateAxis) xyplot.getDomainAxis();
    dateaxis.setVerticalTickLabels(true);
    XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();
    xylineandshaperenderer.setBaseShapesVisible(true);
    xylineandshaperenderer.setUseFillPaint(true);
    xylineandshaperenderer.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator("Tooltip {0}"));
    return jfreechart;
}