Examples of JRDesignTimeSeriesPlot


Examples of net.sf.jasperreports.charts.design.JRDesignTimeSeriesPlot

  private static final String ATTRIBUTE_isShowShapes = "isShowShapes";
  private static final String ATTRIBUTE_isShowLines = "isShowLines";
 
  public Object createObject( Attributes attrs ){
    JRChart chart = (JRChart)digester.peek();
    JRDesignTimeSeriesPlot plot = (JRDesignTimeSeriesPlot)chart.getPlot();
   
    String isShowShapes = attrs.getValue( ATTRIBUTE_isShowShapes );
    if( isShowShapes != null && isShowShapes.length() > 0 ){
      plot.setShowShapes(Boolean.valueOf(isShowShapes));
    }
   
    String isShowLines = attrs.getValue( ATTRIBUTE_isShowLines );
    if( isShowLines != null && isShowLines.length() > 0 ){
      plot.setShowLines(Boolean.valueOf(isShowLines) );
    }
   
    return plot;
  }
View Full Code Here

Examples of net.sf.jasperreports.charts.design.JRDesignTimeSeriesPlot

        dataset = new JRDesignValueDataset(dataset);
        plot = new JRDesignThermometerPlot(plot, this);
        break;
      case CHART_TYPE_TIMESERIES:
        dataset = new JRDesignTimeSeriesDataset(dataset);//other datasets could be supported
        plot = new JRDesignTimeSeriesPlot(plot, this);
        break;
      case CHART_TYPE_XYAREA:
        dataset = new JRDesignXyDataset(dataset);
        plot = new JRDesignAreaPlot(plot, this);
        break;
View Full Code Here

Examples of net.sf.jasperreports.charts.design.JRDesignTimeSeriesPlot

    return valueAxisFormat;
  }
 
  public void transform(DynamicJasperDesign design, JRChartPlot plot, String name) {
    super.transform(design, plot, name);
    JRDesignTimeSeriesPlot timeSeriesPlot = (JRDesignTimeSeriesPlot) plot;
   
    StringExpression timeAxisLabelExp = getTimeAxisFormat().getLabelExpression();
    if (timeAxisLabelExp != null) {
      JRDesignExpression exp = ExpressionUtils.createAndRegisterExpression(design, "timeAxisLabel_" + name, timeAxisLabelExp);
      timeSeriesPlot.setTimeAxisLabelExpression(exp);
    }
    if (timeAxisFormat.getTickLabelMask() != null)
      timeSeriesPlot.setTimeAxisTickLabelMask(timeAxisFormat.getTickLabelMask())
    if (timeAxisFormat.getLabelColor() != null)
      timeSeriesPlot.setTimeAxisLabelColor(timeAxisFormat.getLabelColor());
    if (timeAxisFormat.getLabelFont() != null)
      timeSeriesPlot.setTimeAxisLabelFont(timeAxisFormat.getLabelFont().transform());
    if (timeAxisFormat.getLineColor() != null)
      timeSeriesPlot.setTimeAxisLineColor(timeAxisFormat.getLineColor());   
    if (timeAxisFormat.getTickLabelColor() != null)
      timeSeriesPlot.setTimeAxisTickLabelColor(timeAxisFormat.getTickLabelColor());
    if (timeAxisFormat.getTickLabelFont() != null)
      timeSeriesPlot.setTimeAxisTickLabelFont(timeAxisFormat.getTickLabelFont().transform());
    CustomExpression timeAxisRangeMinValueExp = getTimeAxisFormat().getRangeMinValueExpression();
    if (timeAxisRangeMinValueExp != null) {
      JRDesignExpression exp = ExpressionUtils.createAndRegisterExpression(design, "timeAxisRangeMinValue_" + name, timeAxisRangeMinValueExp);
      timeSeriesPlot.setDomainAxisMinValueExpression(exp);
    }
    CustomExpression timeAxisRangeMaxValueExp = getTimeAxisFormat().getRangeMaxValueExpression();
    if (timeAxisRangeMaxValueExp != null) {
      JRDesignExpression exp = ExpressionUtils.createAndRegisterExpression(design, "timeAxisRangeMaxValue_" + name, timeAxisRangeMaxValueExp);
      timeSeriesPlot.setDomainAxisMaxValueExpression(exp);
    }
   
    StringExpression valueAxisLabelExp = getValueAxisFormat().getLabelExpression();
    if (valueAxisLabelExp != null) {
      JRDesignExpression exp = ExpressionUtils.createAndRegisterExpression(design, "valueAxisLabel_" + name, valueAxisLabelExp);
      timeSeriesPlot.setValueAxisLabelExpression(exp);
    }
    if (valueAxisFormat.getTickLabelMask() != null)
      timeSeriesPlot.setValueAxisTickLabelMask(valueAxisFormat.getTickLabelMask())
    if (valueAxisFormat.getLabelColor() != null)
      timeSeriesPlot.setValueAxisLabelColor(valueAxisFormat.getLabelColor());
    if (valueAxisFormat.getLabelFont() != null)
      timeSeriesPlot.setValueAxisLabelFont(valueAxisFormat.getLabelFont().transform());
    if (valueAxisFormat.getLineColor() != null)
      timeSeriesPlot.setValueAxisLineColor(valueAxisFormat.getLineColor());   
    if (valueAxisFormat.getTickLabelColor() != null)
      timeSeriesPlot.setValueAxisTickLabelColor(valueAxisFormat.getTickLabelColor());
    if (valueAxisFormat.getTickLabelFont() != null)
      timeSeriesPlot.setValueAxisTickLabelFont(valueAxisFormat.getTickLabelFont().transform());
    CustomExpression valueAxisRangeMinValueExp = getValueAxisFormat().getRangeMinValueExpression();
    if (valueAxisRangeMinValueExp != null) {
      JRDesignExpression exp = ExpressionUtils.createAndRegisterExpression(design, "valueAxisRangeMinValue_" + name, valueAxisRangeMinValueExp);
      timeSeriesPlot.setRangeAxisMinValueExpression(exp);
    }
    CustomExpression valueAxisRangeMaxValueExp = getValueAxisFormat().getRangeMaxValueExpression();
    if (valueAxisRangeMaxValueExp != null) {
      JRDesignExpression exp = ExpressionUtils.createAndRegisterExpression(design, "valueAxisRangeMaxValue_" + name, valueAxisRangeMaxValueExp);
      timeSeriesPlot.setRangeAxisMaxValueExpression(exp);
    }
   
    if (showShapes != null)
      timeSeriesPlot.setShowShapes(showShapes);
    if (showLines != null)
      timeSeriesPlot.setShowLines(showLines);
  }
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.