Package com.xeiam.xchart

Examples of com.xeiam.xchart.Chart.addSeries()


    // Create Chart
    Chart chart = new ChartBuilder().chartType(ChartType.Area).width(800).height(600).title(getClass().getSimpleName()).xAxisTitle("X").yAxisTitle("Y").build();
    chart.addSeries("a", new double[] { 0, 3, 5, 7, 9 }, new double[] { -3, 5, 9, 6, 5 });
    chart.addSeries("b", new double[] { 0, 2, 4, 6, 9 }, new double[] { -1, 6, 4, 0, 4 });
    chart.addSeries("c", new double[] { 0, 1, 3, 8, 9 }, new double[] { -2, -1, 1, 0, 1 });

    // Customize Chart
    chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW);
    chart.getStyleManager().setAxisTitlesVisible(false);
View Full Code Here


    chart.getStyleManager().setChartTitleVisible(false);
    chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW);
    chart.getStyleManager().setYAxisLogarithmic(true);

    // Series
    chart.addSeries("10^x", xData, yData);

    return chart;
  }
}
View Full Code Here

        e.printStackTrace();
      }
      xData.add(date);
      yData.add(-1 * 0.00000001 * ((random.nextInt(i) + 1)));
    }
    Series series = chart.addSeries("Model 77", xData, yData);
    series.setLineColor(SeriesColor.RED);
    chart.getStyleManager().setPlotGridLinesVisible(false);
    chart.getStyleManager().setBarFilled(false);

    return chart;
View Full Code Here

      // System.out.println(date.toString());
      xData.add(date);
      yData.add(Math.random() * i);
    }

    Series series = chart.addSeries("blah", xData, yData);
    series.setMarker(SeriesMarker.NONE);

    return chart;

  }
View Full Code Here

  @Override
  public Chart getChart() {

    // Create Chart
    Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).title("XFactor vs. Age").xAxisTitle("Age").yAxisTitle("XFactor").build();
    chart.addSeries("female", new double[] { 10, 20, 30, 40, 50 }, new double[] { 50, 10, 20, 40, 35 });
    chart.addSeries("male", new double[] { 10, 20, 30, 40, 50 }, new double[] { 40, 30, 20, 0, 60 });

    chart.getStyleManager().setYAxisMin(5);
    chart.getStyleManager().setYAxisMax(70);
View Full Code Here

  public Chart getChart() {

    // Create Chart
    Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).title("XFactor vs. Age").xAxisTitle("Age").yAxisTitle("XFactor").build();
    chart.addSeries("female", new double[] { 10, 20, 30, 40, 50 }, new double[] { 50, 10, 20, 40, 35 });
    chart.addSeries("male", new double[] { 10, 20, 30, 40, 50 }, new double[] { 40, 30, 20, 0, 60 });

    chart.getStyleManager().setYAxisMin(5);
    chart.getStyleManager().setYAxisMax(70);

    return chart;
View Full Code Here

      }
      xData.add(date);
      yData.add(Math.random() * i / 10000000000.0);
    }

    chart.addSeries("blah", xData, yData);

    return chart;

  }
}
View Full Code Here

  @Override
  public Chart getChart() {

    // Create Chart
    Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).title("Score Histogram").xAxisTitle("Score").yAxisTitle("Number").build();
    chart.addSeries("test 1", new double[] { 0, 1, 2, 3, 4 }, new double[] { 4, 5, 9, 6, 5 });

    // Customize Chart
    chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW);

    return chart;
View Full Code Here

    chart.getStyleManager().setAxisTickLabelsFont(new Font(Font.SERIF, Font.PLAIN, 11));
    chart.getStyleManager().setDatePattern("dd-MMM");
    chart.getStyleManager().setDecimalPattern("#0.000");
    chart.getStyleManager().setLocale(Locale.GERMAN);

    Series series = chart.addSeries("Fake Data", xData, yData);
    series.setLineColor(SeriesColor.BLUE);
    series.setMarkerColor(Color.ORANGE);
    series.setMarker(SeriesMarker.CIRCLE);
    series.setLineStyle(SeriesLineStyle.SOLID);
View Full Code Here

      // System.out.println(date.toString());
      xData.add(date);
      yData.add(Math.random() * i * 1000000000);
    }

    chart.addSeries("blah", xData, yData);

    return chart;

  }
}
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.