Example usage for org.jfree.chart.renderer.xy DefaultXYItemRenderer setDefaultEntityRadius

List of usage examples for org.jfree.chart.renderer.xy DefaultXYItemRenderer setDefaultEntityRadius

Introduction

In this page you can find the example usage for org.jfree.chart.renderer.xy DefaultXYItemRenderer setDefaultEntityRadius.

Prototype

public void setDefaultEntityRadius(int radius) 

Source Link

Document

Sets the radius of the circle used for the default entity area when no area is specified.

Usage

From source file:com.bdb.weather.display.summary.WindSummary.java

/**
 * Create the plot.//from   www .java 2s.  com
 * 
 * @return The panel that contains the plot
 */
private ChartViewer createPlot() {
    JFreeChart chart = ChartFactory.createXYLineChart("", "", "", null, PlotOrientation.VERTICAL, true, true,
            true);
    plot = (XYPlot) chart.getPlot();
    ChartViewer panel = new ChartViewer(chart);
    panel.setPrefSize(500, 300);
    panel.addChartMouseListener(this);

    //
    // Set up the Domain Axis (X)
    //
    dateAxis = new DateAxis("Time");
    dateAxis.setDateFormatOverride(interval.getLegacyFormat());
    dateAxis.setVerticalTickLabels(true);
    plot.setDomainAxis(dateAxis);

    valueAxis = WindSpeedRangeAxis.create();
    plot.setRangeAxis(valueAxis);

    //
    // Set up the renderer to generate tool tips, not show shapes
    //
    DefaultXYItemRenderer renderer = new DefaultXYItemRenderer();
    renderer.setBaseShapesVisible(false);
    renderer.setBaseToolTipGenerator(
            new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
                    interval.getLegacyFormat(), Speed.getDefaultFormatter()));
    renderer.setDefaultEntityRadius(1);
    plot.setRenderer(SUSTAINED_WIND_SERIES, renderer);

    renderer = new DefaultXYItemRenderer();
    WeatherSenseConstants.configureGustRenderer(renderer, 0);
    plot.setRenderer(GUST_SERIES, renderer);

    return panel;
}

From source file:com.bdb.weather.display.stripchart.StripChart.java

private void createRenderer(int dataset, TimeSeriesCollection collection, NumberFormat format) {
    DefaultXYItemRenderer renderer = new DefaultXYItemRenderer();
    renderer.setBaseShapesVisible(false);

    renderer.setBaseToolTipGenerator(/*from  w w w  .  j  av  a2  s  .co m*/
            new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
                    DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG), format));

    renderer.setDefaultEntityRadius(1);
    plot.setRenderer(dataset, renderer);
    plot.setDataset(dataset, collection);
}