Package com.xeiam.xchart

Examples of com.xeiam.xchart.Chart


  @Override
  public Chart getChart() {

    // Create Chart
    Chart chart = new ChartBuilder().width(800).height(600).theme(ChartTheme.GGPlot2).title("GGPlot2 Theme").xAxisTitle("X").yAxisTitle("Y").build();

    chart.addSeries("vertical", new double[] { 1, 1 }, new double[] { -10, 10 });
    chart.addSeries("horizontal", new double[] { -10, 10 }, new double[] { 0, 0 });

    return chart;
  }
View Full Code Here


public class ScatterChart01 implements ExampleChart {

  public static void main(String[] args) {

    ExampleChart exampleChart = new ScatterChart01();
    Chart chart = exampleChart.getChart();
    new SwingWrapper(chart).displayChart();
  }
View Full Code Here

      xData.add(random.nextGaussian() / 1000);
      yData.add(-1000000 + random.nextGaussian());
    }

    // Create Chart
    Chart chart = new Chart(800, 600);
    chart.getStyleManager().setChartType(ChartType.Scatter);

    // Customize Chart
    chart.getStyleManager().setChartTitleVisible(false);
    chart.getStyleManager().setLegendPosition(LegendPosition.InsideSW);
    chart.getStyleManager().setMarkerSize(16);

    // Series
    chart.addSeries("Gaussian Blob", xData, yData);

    return chart;
  }
View Full Code Here

public class ScatterChart03 implements ExampleChart {

  public static void main(String[] args) {

    ExampleChart exampleChart = new ScatterChart03();
    Chart chart = exampleChart.getChart();
    new SwingWrapper(chart).displayChart();
  }
View Full Code Here

  @Override
  public Chart getChart() {

    // Create Chart
    Chart chart = new Chart(800, 600);

    // Customize Chart
    chart.setChartTitle("Single Point");
    chart.setXAxisTitle("X");
    chart.setYAxisTitle("Y");

    chart.addSeries("single point (1,1)", new double[] { 1 }, new double[] { 1 });

    return chart;
  }
View Full Code Here

public class ScatterChart02 implements ExampleChart {

  public static void main(String[] args) {

    ExampleChart exampleChart = new ScatterChart02();
    Chart chart = exampleChart.getChart();
    new SwingWrapper(chart).displayChart();
  }
View Full Code Here

      xData.add(Math.pow(10, nextRandom * 10));
      yData.add(1000000000.0 + nextRandom);
    }

    // Create Chart
    Chart chart = new Chart(800, 600);
    chart.setChartTitle("Logarithmic Data");
    chart.getStyleManager().setChartType(ChartType.Scatter);
    chart.getStyleManager().setXAxisLogarithmic(true);

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

    // Series
    chart.addSeries("logarithmic data", xData, yData);

    return chart;
  }
View Full Code Here

public class ScatterChart04 implements ExampleChart {

  public static void main(String[] args) {

    ExampleChart exampleChart = new ScatterChart04();
    Chart chart = exampleChart.getChart();
    new SwingWrapper(chart).displayChart();
  }
View Full Code Here

      yData.add(10 * Math.exp(-i));
      errorBars.add(Math.random() + .3);
    }

    // Create Chart
    Chart chart = new ChartBuilder().width(800).height(600).title("ScatterChart04").xAxisTitle("X").yAxisTitle("Y").chartType(ChartType.Scatter).build();

    // Customize Chart
    chart.getStyleManager().setChartTitleVisible(false);
    chart.getStyleManager().setLegendVisible(false);
    chart.getStyleManager().setAxisTitlesVisible(false);

    // Series
    Series series = chart.addSeries("10^(-x)", xData, yData, errorBars);
    series.setMarkerColor(Color.RED);
    series.setMarker(SeriesMarker.SQUARE);

    return chart;
  }
View Full Code Here

public class AreaLineChart03 implements ExampleChart {

  public static void main(String[] args) {

    ExampleChart exampleChart = new AreaLineChart03();
    Chart chart = exampleChart.getChart();
    new SwingWrapper(chart).displayChart();
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchart.Chart

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.