Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRChartDataset


  {
    if(chart != null)
    {
      write( "JRDesignChart " + chartName + " = new JRDesignChart(jasperDesign, JRChart.CHART_TYPE_XYBAR);\n");
      writeChart( chart, chartName);
      JRChartDataset dataset = chart.getDataset();

      if( dataset.getDatasetType() == JRChartDataset.TIMESERIES_DATASET )
      {
        writeTimeSeriesDataset( (JRTimeSeriesDataset)dataset, chartName, "TimeSeriesDataset");
      }
      else if( dataset.getDatasetType() == JRChartDataset.TIMEPERIOD_DATASET ){
        writeTimePeriodDataset( (JRTimePeriodDataset)dataset, chartName, "XyDataset");
      }
      else if( dataset.getDatasetType() == JRChartDataset.XY_DATASET ){
        writeXyDataset( (JRXyDataset) chart.getDataset(), chartName, "XyDataset");
      }
      writeBarPlot( (JRBarPlot) chart.getPlot(), chartName);
      flush();
    }
View Full Code Here


  public void writeXyBarChart(JRChart chart) throws IOException
  {
    writer.startElement(JRXmlConstants.ELEMENT_xyBarChart, getNamespace());

    writeChart(chart);
    JRChartDataset dataset = chart.getDataset();

    if( dataset.getDatasetType() == JRChartDataset.TIMESERIES_DATASET ){
      writeTimeSeriesDataset( (JRTimeSeriesDataset)dataset );
    }
    else if( dataset.getDatasetType() == JRChartDataset.TIMEPERIOD_DATASET ){
      writeTimePeriodDataset( (JRTimePeriodDataset)dataset );
    }
    else if( dataset.getDatasetType() == JRChartDataset.XY_DATASET ){
      writeXyDataset( (JRXyDataset)dataset );
    }

    writeBarPlot((JRBarPlot) chart.getPlot());
View Full Code Here

    if (chart.getEvaluationTimeValue() == EvaluationTimeEnum.AUTO)
    {
      addBrokenRule("Charts do not support Auto evaluation time.", chart);
    }

    JRChartDataset dataset = chart.getDataset();
    if (dataset == null)
    {
      addBrokenRule("Chart dataset missing.", chart);
    }
    else
    {
      dataset.validate(this);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRChartDataset

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.