Example usage for org.jfree.chart.axis SymbolicAxis setInverted

List of usage examples for org.jfree.chart.axis SymbolicAxis setInverted

Introduction

In this page you can find the example usage for org.jfree.chart.axis SymbolicAxis setInverted.

Prototype

public void setInverted(boolean flag) 

Source Link

Document

Sets a flag that controls the direction of values on the axis, and notifies registered listeners that the axis has changed.

Usage

From source file:de.berlios.statcvs.xml.report.ActivityProgressionChart.java

private JFreeChart createContourPlot() {
    Grouper grouper = settings.getGrouper(new ModuleGrouper(settings.getModules(content)));

    ContourDataset data = createDataset(grouper);
    if (data == null) {
        return null;
    }//from   w w w.  jav a 2 s.c  o  m

    ValueAxis xAxis = new DateAxis(I18n.tr("Date"));

    SymbolicAxis yAxis = new SymbolicAxis(grouper.getName(), (String[]) groupNames.toArray(new String[0]));
    yAxis.setInverted(true);
    yAxis.setLowerMargin(0.0);
    yAxis.setUpperMargin(0.0);

    ColorBar zAxis = new ColorBar(I18n.tr("Commit Activity (%)"));
    zAxis.getAxis();

    ContourPlot plot = new ContourPlot(data, xAxis, yAxis, zAxis);
    //plot.setRenderAsPoints(true);
    // don't use plot units for ratios when x axis is date
    plot.setDataAreaRatio(0.0);
    plot.setColorBarLocation(RectangleEdge.BOTTOM);

    return new JFreeChart(settings.getProjectName(), null, plot, false);
}