Package org.jfree.data.category

Examples of org.jfree.data.category.DefaultCategoryDataset


     * Business logic to execute.
     */
    public byte[] calloutRequestsGraph(CallOutRequestReportVO[] openedRows,CallOutRequestReportVO[] closedRows,String title,String x,String y,String opened,String closed) throws Throwable {
      byte[] bytes = null;

      DefaultCategoryDataset categoryDataset = new DefaultCategoryDataset();
      CallOutRequestReportVO row = null;
      for(int i=0;i<openedRows.length;i++) {
        row = openedRows[i];
        categoryDataset.addValue(
          row.getValue()==null?0d:row.getValue().doubleValue(),
          opened,
          row.getName()
        );

        row = closedRows[i];
        categoryDataset.addValue(
          row.getValue()==null?0d:row.getValue().doubleValue(),
          closed,
          row.getName()
        );

View Full Code Here


     * Business logic to execute.
     */
    public byte[] salesGraph(SaleReportVO[] rows,String title,String x,String y) throws Throwable {
      byte[] bytes = null;

      DefaultCategoryDataset categoryDataset = new DefaultCategoryDataset();
      SaleReportVO row = null;
      for(int i=0;i<rows.length;i++) {
        SimpleHistogramBin histogrambin = new SimpleHistogramBin(i, i+1, true, false);
        row = rows[i];
        categoryDataset.addValue(
          row.getValue()==null?0d:row.getValue().doubleValue(),
          "",
          row.getName()
        );
      }
View Full Code Here

    setVisible(true);
  }
 

  public CategoryDataset createDataset(List<AnalysisElements> values) {
    DefaultCategoryDataset result = new DefaultCategoryDataset();
    for (AnalysisElements analysisElements : values) {
      result.addValue(analysisElements.spawnRate, "Spawn Rate" , analysisElements.time);
      result.addValue(analysisElements.leaveRate, "Leave Rate" , analysisElements.time);
      result.addValue(analysisElements.numOfNodes, "numOfNodes" , analysisElements.time);
      result.addValue(analysisElements.dia, "Diameter" , analysisElements.time);
    }
    return result;
  }
View Full Code Here

   public Art2mComponent()
   {
      super("Art2m");

      classesInClastersDataset = new DefaultCategoryDataset();
      clastersInClassesDataset = new DefaultCategoryDataset();

      $$$setupUI$$$();

      setControlPanel(controlPanel);
      setIcon(new ImageIcon(MainFrame.ICONS_DIR + "info.gif"));
View Full Code Here

            solverBenchmark.setRanking(sortedSolverBenchmarkList.indexOf(solverBenchmark));
        }
    }

    private CharSequence writeBestScoreSummaryChart() {
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        for (SolverBenchmark solverBenchmark : solverBenchmarkList) {
            ScoreDefinition scoreDefinition = solverBenchmark.getLocalSearchSolverConfig().getScoreDefinitionConfig()
                    .buildScoreDefinition();
            for (SolverBenchmarkResult result : solverBenchmark.getSolverBenchmarkResultList()) {
                Score score = result.getScore();
                Double scoreGraphValue = scoreDefinition.translateScoreToGraphValue(score);
                String solverLabel = solverBenchmark.getName();
                if (solverBenchmark.getRanking() == 0) {
                    solverLabel += " (winner)";
                }
                dataset.addValue(scoreGraphValue, solverLabel, result.getUnsolvedSolutionFile().getName());
            }
        }
        JFreeChart chart = ChartFactory.createBarChart(
                "Best score summary (higher score is better)", "Data", "Score",
                dataset, PlotOrientation.VERTICAL, true, true, false
View Full Code Here

              rec.center();
              // rec.setWidth("780px");
              // rec.setHeight("700px");
              rec.setSizeFull();

              dataSet = new DefaultCategoryDataset();
              dataSet.clear();

              _vlayout.removeAllComponents();

              for (String s : _server.listOfThemes(String
View Full Code Here

        String category3 = "Category 3";
        String category4 = "Category 4";
        String category5 = "Category 5";

        // create the dataset...
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();

        dataset.addValue(1.0, series1, category1);
        dataset.addValue(4.0, series1, category2);
        dataset.addValue(3.0, series1, category3);
        dataset.addValue(5.0, series1, category4);
        dataset.addValue(5.0, series1, category5);

        dataset.addValue(5.0, series2, category1);
        dataset.addValue(7.0, series2, category2);
        dataset.addValue(6.0, series2, category3);
        dataset.addValue(8.0, series2, category4);
        dataset.addValue(4.0, series2, category5);

        dataset.addValue(4.0, series3, category1);
        dataset.addValue(3.0, series3, category2);
        dataset.addValue(2.0, series3, category3);
        dataset.addValue(3.0, series3, category4);
        dataset.addValue(6.0, series3, category5);

        return dataset;

    }
View Full Code Here

            int dataLength = dataPoints[0].length;
            for (float[] dataPoint : dataPoints)
                assert dataLength ==dataPoint.length;

            DefaultCategoryDataset ds = new DefaultCategoryDataset();

            DateFormat format = timeScale.createDateFormat();

            Date dt = new Date(System.currentTimeMillis()-timeScale.tick*dataLength);
            for (int i = dataLength-1; i>=0; i--) {
                dt = new Date(dt.getTime()+timeScale.tick);
                String l = format.format(dt);
                for(int j=0; j<dataPoints.length; j++)
                    ds.addValue(dataPoints[j][i],series.get(j).title.toString(),l);
            }
            return ds;
        }
View Full Code Here

        rows.add(rowKey);
        columns.add(columnKey);
    }

    public CategoryDataset build() {
        DefaultCategoryDataset ds = new DefaultCategoryDataset();

        TreeSet<Row> rowSet = new TreeSet<Row>(rows);
        TreeSet<Column> colSet = new TreeSet<Column>(columns);

        Comparable[] _rows = rowSet.toArray(new Comparable[rowSet.size()]);
        Comparable[] _cols = colSet.toArray(new Comparable[colSet.size()]);

        // insert rows and columns in the right order
        for (Comparable r : _rows)
            ds.setValue(null, r, _cols[0]);
        for (Comparable c : _cols)
            ds.setValue(null, _rows[0], c);

        for( int i=0; i<values.size(); i++ )
            ds.addValue( values.get(i), rows.get(i), columns.get(i) );
        return ds;
    }
View Full Code Here

   * ---------------------------------------------------------------- Now the function implementation ...
   */

  public Dataset createNewDataset()
  {
    return new DefaultCategoryDataset();
  }
View Full Code Here

TOP

Related Classes of org.jfree.data.category.DefaultCategoryDataset

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.