Examples of CategoryDataset


Examples of ar.com.fdvs.dj.domain.chart.dataset.CategoryDataset

    this.chartType = chartType;
   
    switch(chartType) {
      case AREA_CHART:
      case STACKEDAREA_CHART:
        dataset = new CategoryDataset();
        plot = new AreaPlot();
        break;
      case BAR_CHART:
      case STACKEDBAR_CHART:
        dataset = new CategoryDataset();
        plot = new BarPlot();
        break;
      case BAR3D_CHART:
      case STACKEDBAR3D_CHART:
        dataset = new CategoryDataset();
        plot = new Bar3DPlot();
        break;
      case LINE_CHART:
        dataset = new CategoryDataset();
        plot = new LinePlot();
        break;
      case PIE_CHART:
        dataset = new PieDataset();
        plot = new PiePlot();
View Full Code Here

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

  public double calculateBarWidth(final CategoryPlot plot,
      final Rectangle dataArea, final int rendererIndex) {
    // calculate the bar width
    final CategoryAxis xAxis = plot.getDomainAxisForDataset(rendererIndex);
    final CategoryDataset data = plot.getDataset(rendererIndex);
    if (data != null) {
      final PlotOrientation orientation = plot.getOrientation();
      double space = 0.0;
      if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.height;
      } else if (orientation == PlotOrientation.VERTICAL) {
        space = dataArea.width;
      }
      final double maxWidth = this.calculateMaxBarWidth(plot, dataArea,
          rendererIndex);
      final int groups = this.seriesToGroupMap.getGroupCount();
      final int categories = data.getColumnCount();
      final int columns = groups * categories;
      double categoryMargin = 0.0;
      double itemMargin = 0.0;
      if (categories > 1) {
        categoryMargin = xAxis.getCategoryMargin();
View Full Code Here

Examples of org.jfree.data.CategoryDataset

public class radar extends pspdash.CGIChartBase {

    /** Create a radar chart. */
    public JFreeChart createChart() {
        CategoryDataset catData = data.catDataSource();
        PieDataset pieData = null;
        if (catData.getRowCount() == 1)
            pieData = DatasetUtilities.createPieDatasetForRow(catData, 0);
        else
            pieData = DatasetUtilities.createPieDatasetForColumn(catData, 0);

        RadarPlot plot = new RadarPlot(pieData);
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

    try {
      Transformer transformer = TransformerFactory.newInstance()
          .newTransformer();
      StringWriter reader = new StringWriter();

      CategoryDataset dataset = null;

      transformer.transform(getChartInput.getXmlData(), new StreamResult(
          reader));
      dataset = DatasetReader
          .readCategoryDatasetFromXML(new ByteArrayInputStream(reader
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

    if (dataset instanceof CategoryDataset == false)
    {
      return computeCategoryChart(null);
    }

    final CategoryDataset categoryDataset = (CategoryDataset) dataset;
    return computeCategoryChart(categoryDataset);

  }
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

  }

  public JFreeChart computeCategoryChart(final CategoryDataset barsDataset)
  {
    final JFreeChart chart = super.computeCategoryChart(barsDataset);
    final CategoryDataset linesDataset = createLinesDataset();

    //Create the renderer with the barchart, use a different bar renderer depending
    //if 3D chart or not
    final CategoryPlot plot = chart.getCategoryPlot();
    final CategoryItemRenderer lineRenderer;
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

    {
      dataset = null;
    }


    final CategoryDataset linesDataset;
    if (dataset instanceof CategoryDataset)
    {
      linesDataset = (CategoryDataset) dataset;
    }
    else
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

    {
      webPlot.setURLGenerator(new FormulaCategoryURLGenerator(getRuntime(), getUrlFormula()));
    }


    final CategoryDataset categoryDataset = webPlot.getDataset();
    final int count = categoryDataset.getRowCount();

    for (int t = 0; t < count; t++)
    {
      if (categoryDataset.getRowKey(t) instanceof GridCategoryItem)
      {
        continue;
      }
      webPlot.setSeriesOutlineStroke(t, thick);
    }

    //Set the spiderweb filled (or not)
    webPlot.setWebFilled(radarwebfilled);
    //Set the size of the datapoints on the axis
    webPlot.setHeadPercent(headsize);

    //Set the color of the fake datasets (gridlines) to grey
    for (int t = 0; t < count; t++)
    {
      if (categoryDataset.getRowKey(t) instanceof GridCategoryItem)
      {
        webPlot.setSeriesPaint(t, Color.GRAY);
      }
    }
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

      if (getDataset() == null)
      {
        return result;
      }
      List keys = null;
      final CategoryDataset dataset = getDataset();
      final TableOrder dataExtractOrder = getDataExtractOrder();
      if (dataExtractOrder == TableOrder.BY_ROW)
      {
        keys = dataset.getRowKeys();
      }
      else if (dataExtractOrder == TableOrder.BY_COLUMN)
      {
        keys = dataset.getColumnKeys();
      }
      if (keys == null)
      {
        return result;
      }
View Full Code Here

Examples of org.jfree.data.category.CategoryDataset

    this.shadowYOffset = shadowYOffset;
  }

  protected JFreeChart computeChart(final Dataset dataset)
  {
    final CategoryDataset categoryDataset;
    if (dataset instanceof CategoryDataset == false)
    {
      categoryDataset = null;
    }
    else
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.