Examples of JRCandlestickPlot


Examples of net.sf.jasperreports.charts.JRCandlestickPlot

    writer.startElement(JRXmlConstants.ELEMENT_candlestickChart, getNamespace());

    writeChart(chart);
    writeHighLowDataset((JRHighLowDataset) chart.getDataset());

    JRCandlestickPlot plot = (JRCandlestickPlot) chart.getPlot();
    writer.startElement(JRXmlConstants.ELEMENT_candlestickPlot);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isShowVolume, plot.getShowVolume());

    writePlot(plot);

    writer.writeExpression(JRXmlConstants.ELEMENT_timeAxisLabelExpression, plot.getTimeAxisLabelExpression(), false);
    writeAxisFormat(JRXmlConstants.ELEMENT_timeAxisFormat, plot.getTimeAxisLabelFont(), plot.getOwnTimeAxisLabelColor(),
        plot.getTimeAxisTickLabelFont(), plot.getOwnTimeAxisTickLabelColor(),
        plot.getTimeAxisTickLabelMask(), plot.getTimeAxisVerticalTickLabels(), plot.getOwnTimeAxisLineColor());
    writer.writeExpression(JRXmlConstants.ELEMENT_valueAxisLabelExpression, plot.getValueAxisLabelExpression(), false);
    writeAxisFormat(JRXmlConstants.ELEMENT_valueAxisFormat, plot.getValueAxisLabelFont(), plot.getOwnValueAxisLabelColor(),
        plot.getValueAxisTickLabelFont(), plot.getOwnValueAxisTickLabelColor(),
        plot.getValueAxisTickLabelMask(), plot.getValueAxisVerticalTickLabels(), plot.getOwnValueAxisLineColor());
    writer.writeExpression(JRXmlConstants.ELEMENT_domainAxisMinValueExpression, plot.getDomainAxisMinValueExpression(), false);
    writer.writeExpression(JRXmlConstants.ELEMENT_domainAxisMaxValueExpression, plot.getDomainAxisMaxValueExpression(), false);
    writer.writeExpression(JRXmlConstants.ELEMENT_rangeAxisMinValueExpression, plot.getRangeAxisMinValueExpression(), false);
    writer.writeExpression(JRXmlConstants.ELEMENT_rangeAxisMaxValueExpression, plot.getRangeAxisMaxValueExpression(), false);


    writer.closeElement();
    writer.closeElement();
  }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRCandlestickPlot

    {
      write( "JRDesignChart " + chartName + " = new JRDesignChart(jasperDesign, JRChart.CHART_TYPE_CANDLESTICK);\n");
      writeChart( chart, chartName);
      writeHighLowDataset( (JRHighLowDataset) chart.getDataset(), chartName, "HighLowDataset");
     
      JRCandlestickPlot plot = (JRCandlestickPlot) chart.getPlot();
      if(plot != null)
      {
        String plotName = chartName + "CandlestickPlot";
       
        write( "JRDesignCandlestickPlot " + plotName + " = (JRDesignCandlestickPlot)" + chartName + ".getPlot();\n");
        write( plotName + ".setShowVolume({0});\n", getBooleanText(plot.getShowVolume()));
        writePlot( plot, plotName);
        writeExpression( plot.getTimeAxisLabelExpression(), plotName, "TimeAxisLabelExpression");
        writeAxisFormat(
            indent, plot.getTimeAxisLabelFont(), plot.getOwnTimeAxisLabelColor(),
            plot.getTimeAxisTickLabelFont(), plot.getOwnTimeAxisTickLabelColor(),
            plot.getTimeAxisTickLabelMask(), plot.getTimeAxisVerticalTickLabels(), plot.getOwnTimeAxisLineColor(),
            plotName, "TimeAxisFormat", true
            );
       
        writeExpression( plot.getValueAxisLabelExpression(), plotName, "ValueAxisLabelExpression");
        writeAxisFormat(
            indent, plot.getValueAxisLabelFont(), plot.getOwnValueAxisLabelColor(),
            plot.getValueAxisTickLabelFont(), plot.getOwnValueAxisTickLabelColor(),
            plot.getValueAxisTickLabelMask(), plot.getValueAxisVerticalTickLabels(), plot.getOwnValueAxisLineColor(),
            plotName, "ValueAxisFormat", true
            );
        writeExpression( plot.getDomainAxisMinValueExpression(), plotName, "DomainAxisMinValueExpression");
        writeExpression( plot.getDomainAxisMaxValueExpression(), plotName, "DomainAxisMaxValueExpression");
        writeExpression( plot.getRangeAxisMinValueExpression(), plotName, "RangeAxisMinValueExpression");
        writeExpression( plot.getRangeAxisMaxValueExpression(), plotName, "RangeAxisMaxValueExpression");
   
        flush();
      }
      flush();
    }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRCandlestickPlot

   */
  protected JRBaseCandlestickPlot(JRChartPlot plot, JRChart chart)
  {
    super(plot, chart);
   
    JRCandlestickPlot candlestickPlot = plot instanceof JRCandlestickPlot ? (JRCandlestickPlot)plot : null;
    if (candlestickPlot == null)
    {
      timeAxisLabelFont = new JRBaseFont(chart, null);
      timeAxisTickLabelFont = new JRBaseFont(chart, null);
      valueAxisLabelFont = new JRBaseFont(chart, null);
      valueAxisTickLabelFont = new JRBaseFont(chart, null);
    }
    else
    {
      timeAxisLabelFont = new JRBaseFont(chart, candlestickPlot.getTimeAxisLabelFont());
      timeAxisTickLabelFont = new JRBaseFont(chart, candlestickPlot.getTimeAxisTickLabelFont());
      valueAxisLabelFont = new JRBaseFont(chart, candlestickPlot.getValueAxisLabelFont());
      valueAxisTickLabelFont = new JRBaseFont(chart, candlestickPlot.getValueAxisTickLabelFont());
    }
  }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRCandlestickPlot

        );

    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);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), candlestickPlot.getTimeAxisLabelFont(),
        candlestickPlot.getTimeAxisLabelColor(), candlestickPlot.getTimeAxisTickLabelFont(),
        candlestickPlot.getTimeAxisTickLabelColor(), candlestickPlot.getTimeAxisTickLabelMask(), candlestickPlot.getTimeAxisVerticalTickLabels(),
        candlestickPlot.getTimeAxisLineColor(), false,
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), candlestickPlot.getValueAxisLabelFont(),
        candlestickPlot.getValueAxisLabelColor(), candlestickPlot.getValueAxisTickLabelFont(),
        candlestickPlot.getValueAxisTickLabelColor(), candlestickPlot.getValueAxisTickLabelMask(), candlestickPlot.getValueAxisVerticalTickLabels(),
        candlestickPlot.getValueAxisLineColor(), true,
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
  }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRCandlestickPlot

        );

    configureChart(jfreeChart, getPlot());

    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);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), candlestickPlot.getTimeAxisLabelFont(),
        candlestickPlot.getTimeAxisLabelColor(), candlestickPlot.getTimeAxisTickLabelFont(),
        candlestickPlot.getTimeAxisTickLabelColor(), candlestickPlot.getTimeAxisTickLabelMask(), candlestickPlot.getTimeAxisVerticalTickLabels(),
        candlestickPlot.getOwnTimeAxisLineColor(), false,
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), candlestickPlot.getValueAxisLabelFont(),
        candlestickPlot.getValueAxisLabelColor(), candlestickPlot.getValueAxisTickLabelFont(),
        candlestickPlot.getValueAxisTickLabelColor(), candlestickPlot.getValueAxisTickLabelMask(), candlestickPlot.getValueAxisVerticalTickLabels(),
        candlestickPlot.getOwnValueAxisLineColor(), true,
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
  }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRCandlestickPlot

        );

    configureChart(jfreeChart, getPlot());

    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);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), candlestickPlot.getTimeAxisLabelFont(),
        candlestickPlot.getTimeAxisLabelColor(), candlestickPlot.getTimeAxisTickLabelFont(),
        candlestickPlot.getTimeAxisTickLabelColor(), candlestickPlot.getTimeAxisTickLabelMask(), candlestickPlot.getTimeAxisVerticalTickLabels(),
        candlestickPlot.getOwnTimeAxisLineColor(), getDomainAxisSettings(),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMaxValueExpression())
        );


    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), candlestickPlot.getValueAxisLabelFont(),
        candlestickPlot.getValueAxisLabelColor(), candlestickPlot.getValueAxisTickLabelFont(),
        candlestickPlot.getValueAxisTickLabelColor(), candlestickPlot.getValueAxisTickLabelMask(), candlestickPlot.getValueAxisVerticalTickLabels(),
        candlestickPlot.getOwnValueAxisLineColor(), getRangeAxisSettings(),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMaxValueExpression())
        );

    return jfreeChart;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.