Example usage for org.jfree.chart.renderer.category LineAndShapeRenderer setAutoPopulateSeriesShape

List of usage examples for org.jfree.chart.renderer.category LineAndShapeRenderer setAutoPopulateSeriesShape

Introduction

In this page you can find the example usage for org.jfree.chart.renderer.category LineAndShapeRenderer setAutoPopulateSeriesShape.

Prototype

public void setAutoPopulateSeriesShape(boolean auto) 

Source Link

Document

Sets the flag that controls whether or not the series shape list is automatically populated when #lookupSeriesShape(int) is called.

Usage

From source file:sanger.team16.gui.genevar.eqtl.query.SNPGeneAssocPlot.java

private JFreeChart createChart(String populationName, CategoryDataset categoryDataset, double max, double min) {
    CategoryAxis categoryaxis = new CategoryAxis();
    categoryaxis.setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    //categoryaxis.setMaximumCategoryLabelWidthRatio(5F);
    //categoryaxis.setMaximumCategoryLabelLines(141);
    //categoryaxis.setCategoryMargin(450);

    LineAndShapeRenderer lineandshaperenderer = new LineAndShapeRenderer();
    lineandshaperenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    lineandshaperenderer.setBaseShapesFilled(false);
    lineandshaperenderer.setBaseShape(ShapeUtilities.createDiamond((float) 3));
    lineandshaperenderer.setBaseSeriesVisibleInLegend(false);
    //lineandshaperenderer.setBaseLinesVisible(false);
    lineandshaperenderer.setAutoPopulateSeriesShape(false);
    lineandshaperenderer.setAutoPopulateSeriesPaint(false);
    //lineandshaperenderer.findRangeBounds(categoryDataset);

    NumberAxis numberaxis = new NumberAxis("Expression");
    numberaxis.setAutoRangeIncludesZero(false);
    //numberaxis.setRangeWithMargins(min, max);

    CategoryPlot categoryplot = new CategoryPlot(categoryDataset, categoryaxis, numberaxis,
            lineandshaperenderer);//from   ww  w  .  ja  va  2s  .co  m
    categoryplot.setDomainGridlinesVisible(false);
    categoryplot.setOrientation(PlotOrientation.VERTICAL);

    JFreeChart jfreechart = new JFreeChart(populationName, new Font("SansSerif", 1, 14), categoryplot, true);
    return jfreechart;
}