Package com.positive.charts.renderer.category

Examples of com.positive.charts.renderer.category.BarRenderer


      throw new IllegalArgumentException("Null 'orientation' argument.");
    }
    final CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    final ValueAxis valueAxis = new NumberAxis(valueAxisLabel);

    final BarRenderer renderer = new BarRenderer();
    if (orientation == PlotOrientation.HORIZONTAL) {
      final ItemLabelPosition position1 = new ItemLabelPosition(
          ItemLabelAnchor.OUTSIDE3, TextAnchor.CENTER_LEFT);
      renderer.setBasePositiveItemLabelPosition(position1);
      final ItemLabelPosition position2 = new ItemLabelPosition(
          ItemLabelAnchor.OUTSIDE9, TextAnchor.CENTER_RIGHT);
      renderer.setBaseNegativeItemLabelPosition(position2);
    } else if (orientation == PlotOrientation.VERTICAL) {
      final ItemLabelPosition position1 = new ItemLabelPosition(
          ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);
      renderer.setBasePositiveItemLabelPosition(position1);
      final ItemLabelPosition position2 = new ItemLabelPosition(
          ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);
      renderer.setBaseNegativeItemLabelPosition(position2);
    }
    if (tooltips) {
      renderer
          .setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    }

    final CategoryPlot plot = new CategoryPlot(dataset, categoryAxis,
        valueAxis, renderer);
View Full Code Here

TOP

Related Classes of com.positive.charts.renderer.category.BarRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.