Package com.positive.charts.data.category

Examples of com.positive.charts.data.category.DefaultCategoryDataset


      throw new IllegalArgumentException("Null 'rowKey' argument.");
    }
    if (rowData == null) {
      throw new IllegalArgumentException("Null 'rowData' argument.");
    }
    final DefaultCategoryDataset result = new DefaultCategoryDataset();
    for (int i = 0; i < rowData.getItemCount(); i++) {
      result.addValue(rowData.getValue(i), rowKey, rowData.getKey(i));
    }
    return result;

  }
View Full Code Here


          "The number of column keys does not match the number of "
              + "columns in the data array.");
    }

    // now do the work...
    final DefaultCategoryDataset result = new DefaultCategoryDataset();
    for (int r = 0; r < data.length; r++) {
      final Comparable rowKey = rowKeys[r];
      for (int c = 0; c < data[r].length; c++) {
        final Comparable columnKey = columnKeys[c];
        result.addValue(new Double(data[r][c]), rowKey, columnKey);
      }
    }
    return result;

  }
View Full Code Here

   */
  public static CategoryDataset createCategoryDataset(
      final String rowKeyPrefix, final String columnKeyPrefix,
      final double[][] data) {

    final DefaultCategoryDataset result = new DefaultCategoryDataset();
    for (int r = 0; r < data.length; r++) {
      final String rowKey = rowKeyPrefix + (r + 1);
      for (int c = 0; c < data[r].length; c++) {
        final String columnKey = columnKeyPrefix + (c + 1);
        result.addValue(new Double(data[r][c]), rowKey, columnKey);
      }
    }
    return result;

  }
View Full Code Here

   */
  public static CategoryDataset createCategoryDataset(
      final String rowKeyPrefix, final String columnKeyPrefix,
      final Number[][] data) {

    final DefaultCategoryDataset result = new DefaultCategoryDataset();
    for (int r = 0; r < data.length; r++) {
      final String rowKey = rowKeyPrefix + (r + 1);
      for (int c = 0; c < data[r].length; c++) {
        final String columnKey = columnKeyPrefix + (c + 1);
        result.addValue(data[r][c], rowKey, columnKey);
      }
    }
    return result;

  }
View Full Code Here

TOP

Related Classes of com.positive.charts.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.