Esempio n. 1
0
  /** Create the chart */
  private void createChart() {
    if (chartPanel != null) {
      return;
    }

    MyHistogramDataset dataset = new MyHistogramDataset();
    chart =
        ChartFactory.createHistogram(
            "Histogram", null, null, dataset, PlotOrientation.VERTICAL, true, false, false);
    chart.getXYPlot().setForegroundAlpha(0.75f);
    plot = (XYPlot) chart.getPlot();
    initXYPlot(plot);
    chartPanel = doMakeChartPanel(chart);
  }