List of usage examples for org.jfree.chart.axis CategoryAxis3D CategoryAxis3D
public CategoryAxis3D()
From source file:org.sonar.plugins.abacus.chart.BarChart3D.java
private void configureDomainAxis(CategoryPlot plot, Font font) { CategoryAxis3D categoryAxis = new CategoryAxis3D(); categoryAxis.setTickMarksVisible(true); categoryAxis.setTickLabelFont(font); categoryAxis.setTickLabelPaint(OUTLINE_COLOR); plot.setDomainAxis(categoryAxis);/*from ww w . j ava 2 s . c o m*/ plot.setDomainGridlinesVisible(false); }
From source file:org.toobsframework.pres.chart.ChartUtil.java
public static CategoryAxis createCategoryAxis(IRequest componentRequest, DomainAxisDef categoryAxisDef, Map params, boolean is3D) { CategoryAxis categoryAxis;//from w w w . jav a 2 s . c o m if (is3D) { categoryAxis = new CategoryAxis3D(); } else { categoryAxis = new CategoryAxis(); } if (categoryAxisDef != null) { if (categoryAxisDef.getDomainLabel() != null) { categoryAxis .setLabel(evaluateTextLabel(componentRequest, categoryAxisDef.getDomainLabel(), params)); if (categoryAxisDef.getDomainLabel().getFont() != null) { categoryAxis.setLabelFont(getFont(categoryAxisDef.getDomainLabel(), null)); } categoryAxis.setLabelPaint(getColor(categoryAxisDef.getDomainLabel().getColor())); } if (categoryAxisDef.getLabelPosition() != null) { Integer labelPos = domainLabelPositions.get(ParameterUtil.resolveParam(componentRequest, categoryAxisDef.getLabelPosition(), params, "standard")[0]); if (labelPos != null) { switch (labelPos) { case DOM_LABEL_STANDARD_TYPE: categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.STANDARD); break; case DOM_LABEL_UP_45_TYPE: categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45); break; case DOM_LABEL_DOWN_45_TYPE: categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_45); break; case DOM_LABEL_UP_90_TYPE: categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90); break; case DOM_LABEL_DOWN_90_TYPE: categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_90); break; } } } double domainMargin = Double.parseDouble(ParameterUtil.resolveParam(componentRequest, categoryAxisDef.getDomainMargin(), params, "0.0")[0]); double lowerMargin = Double.parseDouble(ParameterUtil.resolveParam(componentRequest, categoryAxisDef.getLowerMargin(), params, "0.0")[0]); double upperMargin = Double.parseDouble(ParameterUtil.resolveParam(componentRequest, categoryAxisDef.getUpperMargin(), params, "0.0")[0]); categoryAxis.setCategoryMargin(domainMargin); categoryAxis.setLowerMargin(lowerMargin); categoryAxis.setUpperMargin(upperMargin); } return categoryAxis; }