Package org.jfree.data.general

Examples of org.jfree.data.general.Dataset


   */


  public JFreeChart createChart(DatasetMap datasets) {
    logger.debug("IN");
    Dataset dataset=(Dataset)datasets.getDatasets().get("1");

    ThermometerPlot plot = new ThermometerPlot((ValueDataset)dataset);
    JFreeChart chart = new JFreeChart(name, JFreeChart.DEFAULT_TITLE_FONT,  plot, true);              
    chart.setBackgroundPaint(color);
 
View Full Code Here


   * @return A chart .
   */

  public JFreeChart createChart(DatasetMap datasets) {

    Dataset dataset=(Dataset)datasets.getDatasets().get("1");

    MeterPlot plot = new MeterPlot((ValueDataset)dataset);
    plot.setRange(new Range(lower, upper));


View Full Code Here

  /* (non-Javadoc)
   * @see it.eng.spagobi.engines.chart.bo.charttypes.piecharts.PieCharts#createChart(java.lang.String, org.jfree.data.general.Dataset)
   */
  public JFreeChart createChart(DatasetMap datasets) {

    Dataset dataset=(Dataset)datasets.getDatasets().get("1");
   
    JFreeChart chart=null;

    if(!threeD){
      chart = ChartFactory.createPieChart(
View Full Code Here

  /* (non-Javadoc)
   * @see it.eng.spagobi.engines.chart.bo.charttypes.piecharts.PieCharts#createChart(java.lang.String, org.jfree.data.general.Dataset)
   */
  public JFreeChart createChart(DatasetMap datasets) {
    Dataset dataset=(Dataset)datasets.getDatasets().get("1");

    boolean document_composition=false;
    if(mode.equalsIgnoreCase(SpagoBIConstants.DOCUMENT_COMPOSITION))document_composition=true;


View Full Code Here

  public DatasetMap filteringSimpleBarChartUtil(AttributesContainer requestCont,AttributesContainer responseCont, BarCharts sbi, String sbiMode, boolean docComposition){
    logger.debug("IN");


    DefaultCategoryDataset dataset=(DefaultCategoryDataset)datasets.get("1");
    Dataset copyDataset=null;
    DatasetMap newDatasetMap=null;
    boolean notDisappearSlider=false;   // if n_visualization>=number total categories do not make slider disappear
    try {
      copyDataset = (DefaultCategoryDataset)dataset.clone();
    } catch (CloneNotSupportedException e) {
View Full Code Here

      String  key = (String ) iterator.next();

      DefaultCategoryDataset dataset=(DefaultCategoryDataset) datasets.get(key)// this is the old dataset to filter


      Dataset copyDataset=null;
      try {
        copyDataset = (DefaultCategoryDataset)dataset.clone()// clone dataset
      } catch (CloneNotSupportedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here

 

  public DatasetMap filteringGroupedBarChartUtil(AttributesContainer requestCont,AttributesContainer responseCont, StackedBarGroup sbi, String sbiMode, boolean docComposition){
    logger.debug("IN");
    DefaultCategoryDataset dataset=(DefaultCategoryDataset)datasets.get("1");
    Dataset copyDataset=null;
    boolean notDisappearSlider=false;   // if n_visualization>=number total categories do not make slider disappear

    try {
      copyDataset = (DefaultCategoryDataset)dataset.clone();
    } catch (CloneNotSupportedException e) {
View Full Code Here

         }
      }
      int datasetCount = this.datasets.size();
      for (int i = 0; i < datasetCount; i++)
      {
         Dataset dataset = (Dataset) this.datasets.get(i);
         if (dataset != null)
         {
            dataset.addChangeListener(this);
         }
      }
      int rendererCount = this.renderers.size();
      for (int i = 0; i < rendererCount; i++)
      {
View Full Code Here

    {
        super.encodeEnd(context);
       
        UIChart chart = (UIChart) findITextParent(getParent(), UIChart.class);
        if (chart != null) {           
            Dataset dataset = chart.getDataset();
           
            if (dataset instanceof DefaultPieDataset) {
                DefaultPieDataset piedata = (DefaultPieDataset) dataset;
                piedata.setValue(getKey(), getNumericValue());              

                PiePlot plot = (PiePlot) chart.getChart().getPlot();
               
                if (getExplodedPercent() != null) {
                    plot.setExplodePercent(getKey(), getExplodedPercent());
                }
               
                if (UIChart.findColor(getSectionPaint()) != null) {                   
                    plot.setSectionPaint(getKey(), UIChart.findColor(getSectionPaint()));
                }
               
                if (UIChart.findColor(getSectionOutlinePaint()) != null) {
                    plot.setSectionOutlinePaint(getKey(), UIChart.findColor(getSectionOutlinePaint()));
                }
               
                if (UIChart.findStroke(getSectionOutlineStroke()) != null) {
                    plot.setSectionOutlineStroke(getKey(), UIChart.findStroke(getSectionOutlineStroke()));
                }               
            } else if (dataset instanceof DefaultCategoryDataset) {
                DefaultCategoryDataset data = (DefaultCategoryDataset) dataset;
               
                //CategoryPlot plot = (CategoryPlot) chart.getChart().getPlot();
                data.addValue(getNumericValue(), getSeries(), getKey());      
            } else {
                throw new RuntimeException("Cannot add data to dataset of type " + dataset.getClass());
            }        
        }
    }
View Full Code Here

    @Override
    public void encodeEnd(FacesContext context)
        throws IOException
    {
        UIChart chart = (UIChart) findITextParent(getParent(), UIChart.class);
        Dataset dataset = chart.getDataset();
        if (chart != null) {           
            Plot p = chart.getChart().getPlot();
            if (p instanceof CategoryPlot) {
                CategoryPlot plot = (CategoryPlot) p;               
View Full Code Here

TOP

Related Classes of org.jfree.data.general.Dataset

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.