Example usage for org.jfree.chart.axis LogarithmicAxis setStrictValuesFlag

List of usage examples for org.jfree.chart.axis LogarithmicAxis setStrictValuesFlag

Introduction

In this page you can find the example usage for org.jfree.chart.axis LogarithmicAxis setStrictValuesFlag.

Prototype

public void setStrictValuesFlag(boolean flgVal) 

Source Link

Document

Sets the 'strictValuesFlag' flag; if true and 'allowNegativesFlag' is false then this axis will throw a runtime exception if any of its values are less than or equal to zero; if false then the axis will adjust for values less than or equal to zero as needed.

Usage

From source file:org.pentaho.plugin.jfreereport.reportcharts.XYChartExpression.java

protected void configureLogarithmicAxis(final XYPlot plot) {
    if (isLogarithmicAxis()) {
        final LogarithmicAxis logarithmicAxis;
        if (isHumanReadableLogarithmicFormat()) {
            plot.getRenderer().setBaseItemLabelGenerator(new LogXYItemLabelGenerator());
            logarithmicAxis = new ScalingLogarithmicAxis(getRangeTitle());
            logarithmicAxis.setStrictValuesFlag(false);
        } else {/*from  www. ja v a  2s  . c o m*/
            logarithmicAxis = new LogarithmicAxis(getRangeTitle());
            logarithmicAxis.setStrictValuesFlag(false);
        }

        plot.setRangeAxis(logarithmicAxis);
    }
}

From source file:org.pentaho.plugin.jfreereport.reportcharts.CategoricalChartExpression.java

protected void configureLogarithmicAxis(final CategoryPlot plot) {
    if (isLogarithmicAxis()) {
        final LogarithmicAxis logarithmicAxis;
        if (isHumanReadableLogarithmicFormat()) {
            plot.getRenderer().setBaseItemLabelGenerator(new LogCategoryItemLabelGenerator());
            logarithmicAxis = new ScalingLogarithmicAxis(getValueAxisLabel());
            logarithmicAxis.setStrictValuesFlag(false);
        } else {//from  w  ww  .j  a  va  2 s  .c o m
            logarithmicAxis = new LogarithmicAxis(getValueAxisLabel());
            logarithmicAxis.setStrictValuesFlag(false);
        }

        plot.setRangeAxis(logarithmicAxis);
    }
}