Example usage for org.jfree.chart.axis CategoryLabelPositions STANDARD

List of usage examples for org.jfree.chart.axis CategoryLabelPositions STANDARD

Introduction

In this page you can find the example usage for org.jfree.chart.axis CategoryLabelPositions STANDARD.

Prototype

CategoryLabelPositions STANDARD

To view the source code for org.jfree.chart.axis CategoryLabelPositions STANDARD.

Click Source Link

Document

STANDARD category label positions.

Usage

From source file:org.openfaces.component.chart.impl.helpers.CategoryAxis3DAdapter.java

public CategoryAxis3DAdapter(String label, boolean visible, ChartCategoryAxis chartCategoryAxis,
        ChartAxis chartBaseAxis, GridChartView view) {
    if (!visible) {
        setVisible(false);/*from  www.jav a 2  s  .co m*/
        return;
    }
    if (chartCategoryAxis == null) {
        setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    } else {
        setCategoryLabelPositions(
                PropertiesConverter.toCategroryLabelPosition(chartCategoryAxis.getPosition()));
    }

    FakeAxisStyle fakeStyle = new FakeAxisStyle(chartCategoryAxis, chartBaseAxis, view);
    AxisUtil.setupAxisPresentation(label, this, fakeStyle);
}

From source file:org.openfaces.component.chart.impl.helpers.CategoryAxisAdapter.java

public CategoryAxisAdapter(String label, boolean visible, ChartCategoryAxis chartCategoryAxis,
        ChartAxis chartBaseAxis, GridChartView view) {
    if (!visible) {
        setVisible(false);/*from   ww w  .  j a  v  a2s.  c om*/
        return;
    }
    if (chartCategoryAxis == null) {
        setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    } else {
        setCategoryLabelPositions(
                PropertiesConverter.toCategroryLabelPosition(chartCategoryAxis.getPosition()));
        Double categoryMargin = chartCategoryAxis.getCategoryMargin();
        if (categoryMargin != null)
            setCategoryMargin(categoryMargin);
        Double upperMargin = chartCategoryAxis.getUpperMargin();
        if (upperMargin != null)
            setUpperMargin(upperMargin);
        Double lowerMargin = chartCategoryAxis.getLowerMargin();
        if (lowerMargin != null)
            setLowerMargin(lowerMargin);
    }

    FakeAxisStyle fakeStyle = new FakeAxisStyle(chartCategoryAxis, chartBaseAxis, view);
    AxisUtil.setupAxisPresentation(label, this, fakeStyle);
}

From source file:com.xpn.xwiki.plugin.charts.params.CategoryLabelPositionsChartParam.java

@Override
protected void init() {
    addChoice("down_45", CategoryLabelPositions.DOWN_45);
    addChoice("down_90", CategoryLabelPositions.DOWN_90);
    addChoice("standard", CategoryLabelPositions.STANDARD);
    addChoice("up_45", CategoryLabelPositions.UP_45);
    addChoice("up_90", CategoryLabelPositions.UP_90);
}

From source file:com.jtk.pengelolaanujian.view.dashboard.PipePanelSample.java

private ChartPanel createChart(DefaultCategoryDataset data) {
    barchart = ChartFactory.createBarChart3D("Data Keterlambatan pengelolaan Soal Ujian", "Aktifitas",
            "Jumlah Keterlambatan", data, PlotOrientation.VERTICAL, true, true, false);
    barchart.setBackgroundPaint(new Color(135, 206, 250));
    CategoryPlot plot = (CategoryPlot) barchart.getPlot();
    plot.setNoDataMessage("Data Tidak ada");
    CategoryAxis axis = plot.getDomainAxis();
    axis.setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    CategoryItemRenderer renderer = plot.getRenderer();
    renderer.setBaseItemLabelsVisible(true);
    BarRenderer barRenderer = (BarRenderer) renderer;
    barRenderer.setItemMargin(0.1D);// w  w  w .java  2 s .  com
    barRenderer.setDrawBarOutline(true);
    return new ChartPanel(barchart);
}

From source file:sernet.gs.ui.rcp.main.bsi.views.chart.StufenBarChart.java

protected JFreeChart createBarChart(Object dataset) {
    final float plotForegroundAlpha = 0.6f;
    JFreeChart chart = ChartFactory.createStackedBarChart3D(null, Messages.StufenBarChart_1,
            Messages.StufenBarChart_2, (CategoryDataset) dataset, PlotOrientation.HORIZONTAL, false, true,
            false);//from   w  w  w  .ja v  a 2s . c o m
    chart.setBackgroundPaint(Color.white);
    chart.getPlot().setForegroundAlpha(plotForegroundAlpha);
    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();

    plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    return chart;

}

From source file:sernet.gs.ui.rcp.main.bsi.views.chart.UmsetzungBarChart.java

protected JFreeChart createBarChart(Object dataset) {
    final float plotForegroundAlpha = 0.6f;
    JFreeChart chart = ChartFactory.createStackedBarChart3D(null, Messages.UmsetzungBarChart_1,
            Messages.UmsetzungBarChart_2, (CategoryDataset) dataset, PlotOrientation.HORIZONTAL, false, true,
            false);/*from  w w w .ja v  a  2s  . co  m*/
    chart.setBackgroundPaint(Color.white);
    chart.getPlot().setForegroundAlpha(plotForegroundAlpha);
    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();

    plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    return chart;

}

From source file:sernet.gs.ui.rcp.main.bsi.views.chart.SchichtenBarChart.java

protected JFreeChart createBarChart(Object dataset) {
    final float plotForegroundAlpha = 0.6f;
    JFreeChart chart = ChartFactory.createBarChart3D(null, Messages.SchichtenBarChart_1,
            Messages.SchichtenBarChart_2, (CategoryDataset) dataset, PlotOrientation.HORIZONTAL, false, true,
            false);//from www  .ja v a  2s  .  c om
    chart.setBackgroundPaint(Color.white);
    chart.getPlot().setForegroundAlpha(plotForegroundAlpha);
    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();

    plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    return chart;

}

From source file:sernet.gs.ui.rcp.main.bsi.views.chart.MaturityBarChart.java

protected JFreeChart createBarChart(Object dataset) {
    final float plotForegroundAlpha = 0.6f;
    final int axisUpperBound = 9;
    JFreeChart chart = ChartFactory.createBarChart3D(null, Messages.MaturityBarChart_1,
            Messages.MaturityBarChart_2, (CategoryDataset) dataset, PlotOrientation.HORIZONTAL, false, true,
            false);//from   ww  w.j av  a2s . c om
    chart.setBackgroundPaint(Color.white);
    chart.getPlot().setForegroundAlpha(plotForegroundAlpha);
    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();

    plot.getRenderer().setSeriesPaint(0, ChartColor.LIGHT_BLUE);

    plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);

    NumberAxis axis = (NumberAxis) plot.getRangeAxis();
    axis.setUpperBound(axisUpperBound);

    return chart;
}

From source file:sernet.gs.ui.rcp.main.bsi.views.chart.SamtProgressChart.java

protected JFreeChart createBarChart(Object dataset) {
    JFreeChart chart = ChartFactory.createBarChart3D(null, Messages.SamtProgressChart_1,
            Messages.SamtProgressChart_2, (CategoryDataset) dataset, PlotOrientation.HORIZONTAL, true, true,
            false);/*from   ww  w.j  a  v  a2s.  c  o m*/

    chart.setBackgroundPaint(Color.white);
    chart.getPlot().setForegroundAlpha(CHART_FOREGROUND_ALPHA);
    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();

    plot.getRenderer().setSeriesPaint(0, ChartColor.LIGHT_GREEN);
    plot.getRenderer().setSeriesPaint(1, ChartColor.LIGHT_RED);

    plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);

    NumberAxis axis = (NumberAxis) plot.getRangeAxis();
    axis.setUpperBound(AXIS_UPPER_BOUND);

    return chart;
}

From source file:sernet.gs.ui.rcp.main.bsi.views.chart.LebenszyklusBarChart.java

protected JFreeChart createBarChart(Object dataset) {
    final float foregroundAlpha = 0.6f;
    JFreeChart chart = ChartFactory.createStackedBarChart3D(null, Messages.LebenszyklusBarChart_2,
            Messages.LebenszyklusBarChart_3, (CategoryDataset) dataset, PlotOrientation.HORIZONTAL, false, true,
            false);//w  w w.  j a v a 2 s.  co  m
    chart.setBackgroundPaint(Color.white);
    chart.getPlot().setForegroundAlpha(foregroundAlpha);
    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();

    plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);
    return chart;

}