Package org.jfree.chart

Examples of org.jfree.chart.JFreeChart


   *
   */
  protected JFreeChart createBarChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createBarChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRBarPlot)getPlot()).getCategoryAxisLabelExpression()),
        (String)evaluateExpression(((JRBarPlot)getPlot()).getValueAxisLabelExpression()),
        (CategoryDataset)getDataset(),
        getPlot().getOrientation(),
        isShowLegend(),
        true,
        false
        );

    configureChart(jfreeChart);

    CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
    //plot.setNoDataMessage("No data to display");
   
    JRBarPlot barPlot = (JRBarPlot)getPlot();
    boolean isShowTickMarks = barPlot.getShowTickMarks() == null ? true : barPlot.getShowTickMarks().booleanValue();
    boolean isShowTickLabels = barPlot.getShowTickLabels() == null ? true : barPlot.getShowTickLabels().booleanValue();
View Full Code Here



  protected JFreeChart createBubbleChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createBubbleChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRBubblePlot)getPlot()).getXAxisLabelExpression()),
        (String)evaluateExpression(((JRBubblePlot)getPlot()).getYAxisLabelExpression()),
         (XYZDataset)getDataset(),
         getPlot().getOrientation(),
         isShowLegend(),
         true,
         false);

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
    JRBubblePlot bubblePlot = (JRBubblePlot)getPlot();
    int scaleType = bubblePlot.getScaleTypeValue() == null ? ScaleTypeEnum.ON_RANGE_AXIS.getValue() : bubblePlot.getScaleTypeValue().getValue();
    XYBubbleRenderer bubbleRenderer = new XYBubbleRenderer( scaleType );
    xyPlot.setRenderer( bubbleRenderer );
View Full Code Here

   *
   */
  protected JFreeChart createCandlestickChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createCandlestickChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRCandlestickPlot)getPlot()).getTimeAxisLabelExpression()),
        (String)evaluateExpression(((JRCandlestickPlot)getPlot()).getValueAxisLabelExpression()),
        (DefaultHighLowDataset)getDataset(),
        isShowLegend()
        );

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot)getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true : candlestickPlot.getShowVolume().booleanValue();
    candlestickRenderer.setDrawVolume(isShowVolume);

View Full Code Here

   *
   */
  protected JFreeChart createHighLowChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createHighLowChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRHighLowPlot)getPlot()).getTimeAxisLabelExpression()),
        (String)evaluateExpression(((JRHighLowPlot)getPlot()).getValueAxisLabelExpression()),
        (DefaultHighLowDataset)getDataset(),
        isShowLegend()
        );

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRHighLowPlot highLowPlot = (JRHighLowPlot)getPlot();
    HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
    boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false : highLowPlot.getShowOpenTicks().booleanValue();
    boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false : highLowPlot.getShowCloseTicks().booleanValue();
   
View Full Code Here


  protected JFreeChart createLineChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createLineChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression( ((JRLinePlot)getPlot()).getCategoryAxisLabelExpression()),
        (String)evaluateExpression(((JRLinePlot)getPlot()).getValueAxisLabelExpression()),
        (CategoryDataset)getDataset(),
        getPlot().getOrientation(),
        isShowLegend(),
        true,
        false);

    configureChart(jfreeChart);

    CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
    JRLinePlot linePlot = (JRLinePlot)getPlot();

    LineAndShapeRenderer lineRenderer = (LineAndShapeRenderer)categoryPlot.getRenderer();
    boolean isShowShapes = linePlot.getShowShapes() == null ? true : linePlot.getShowShapes().booleanValue();
    boolean isShowLines = linePlot.getShowLines() == null ? true : linePlot.getShowLines().booleanValue();
View Full Code Here

   *
   */
  protected JFreeChart createPie3DChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createPieChart3D(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (PieDataset)getDataset(),
        isShowLegend(),
        true,
        false
        );

    configureChart(jfreeChart);

    PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot();
    //plot.setStartAngle(290);
    //plot.setDirection(Rotation.CLOCKWISE);
    //plot.setNoDataMessage("No data to display");
    JRPie3DPlot jrPie3DPlot = (JRPie3DPlot)getPlot();
    double depthFactor = jrPie3DPlot.getDepthFactorDouble() == null ? JRPie3DPlot.DEPTH_FACTOR_DEFAULT : jrPie3DPlot.getDepthFactorDouble().doubleValue();
View Full Code Here

   *
   */
  protected JFreeChart createPieChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createPieChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (PieDataset)getDataset(),
        isShowLegend(),
        true,
        false
        );

    configureChart(jfreeChart);
    PiePlot piePlot = (PiePlot)jfreeChart.getPlot();
    //plot.setStartAngle(290);
    //plot.setDirection(Rotation.CLOCKWISE);
    //plot.setNoDataMessage("No data to display");
    JRPiePlot jrPiePlot = (JRPiePlot)getPlot();
    boolean isCircular = jrPiePlot.getCircular() == null ? true : jrPiePlot.getCircular().booleanValue();
View Full Code Here


  protected JFreeChart createScatterChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createScatterPlot(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRScatterPlot)getPlot()).getXAxisLabelExpression()),
        (String)evaluateExpression(((JRScatterPlot)getPlot()).getYAxisLabelExpression() ),
        (XYDataset)getDataset(),
        getPlot().getOrientation(),
        isShowLegend(),
        true,
        false);

    configureChart(jfreeChart);
    XYLineAndShapeRenderer plotRenderer = (XYLineAndShapeRenderer) ((XYPlot)jfreeChart.getPlot()).getRenderer();

    JRScatterPlot scatterPlot = (JRScatterPlot) getPlot();
    boolean isShowLines = scatterPlot.getShowLines() == null ? true : scatterPlot.getShowLines().booleanValue();
    boolean isShowShapes = scatterPlot.getShowShapes() == null ? true : scatterPlot.getShowShapes().booleanValue();
   
    plotRenderer.setBaseLinesVisible(isShowLines);
    plotRenderer.setBaseShapesVisible(isShowShapes);

    // Handle the axis formating for the category axis
    configureAxis(jfreeChart.getXYPlot().getDomainAxis(), scatterPlot.getXAxisLabelFont(),
        scatterPlot.getXAxisLabelColor(), scatterPlot.getXAxisTickLabelFont(),
        scatterPlot.getXAxisTickLabelColor(), scatterPlot.getXAxisTickLabelMask(), scatterPlot.getXAxisVerticalTickLabels(),
        scatterPlot.getXAxisLineColor(), false,
        (Comparable)evaluateExpression(scatterPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(scatterPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(jfreeChart.getXYPlot().getRangeAxis(), scatterPlot.getYAxisLabelFont(),
        scatterPlot.getYAxisLabelColor(), scatterPlot.getYAxisTickLabelFont(),
        scatterPlot.getYAxisTickLabelColor(), scatterPlot.getYAxisTickLabelMask(), scatterPlot.getYAxisVerticalTickLabels(),
        scatterPlot.getYAxisLineColor(), true,
        (Comparable)evaluateExpression(scatterPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(scatterPlot.getRangeAxisMaxValueExpression()));
View Full Code Here

   *
   */
  protected JFreeChart createStackedBar3DChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createStackedBarChart3D(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRBar3DPlot)getPlot()).getCategoryAxisLabelExpression()),
        (String)evaluateExpression(((JRBar3DPlot)getPlot()).getValueAxisLabelExpression()),
        (CategoryDataset)getDataset(),
        getPlot().getOrientation(),
        isShowLegend(),
        true,
        false
        );

    configureChart(jfreeChart);

    CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
    JRBar3DPlot bar3DPlot = (JRBar3DPlot)getPlot();

    StackedBarRenderer3D stackedBarRenderer3D =
      new StackedBarRenderer3D(
        bar3DPlot.getXOffsetDouble() == null ? StackedBarRenderer3D.DEFAULT_X_OFFSET : bar3DPlot.getXOffsetDouble().doubleValue(),
View Full Code Here

   *
   */
  protected JFreeChart createStackedBarChart() throws JRException
  {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart =
      ChartFactory.createStackedBarChart(
        (String)evaluateExpression(getChart().getTitleExpression()),
        (String)evaluateExpression(((JRBarPlot)getPlot()).getCategoryAxisLabelExpression()),
        (String)evaluateExpression(((JRBarPlot)getPlot()).getValueAxisLabelExpression()),
        (CategoryDataset)getDataset(),
        getPlot().getOrientation(),
        isShowLegend(),
        true,
        false
        );

    configureChart(jfreeChart);

    CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
    JRBarPlot barPlot = (JRBarPlot)getPlot();
    //plot.setNoDataMessage("No data to display");
    boolean isShowTickMarks = barPlot.getShowTickMarks() == null ? true : barPlot.getShowTickMarks().booleanValue();
    boolean isShowTickLabels = barPlot.getShowTickLabels() == null ? true : barPlot.getShowTickLabels().booleanValue();
    boolean isShowLabels = barPlot.getShowLabels() == null ? false : barPlot.getShowLabels().booleanValue();
View Full Code Here

TOP

Related Classes of org.jfree.chart.JFreeChart

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.