From: Andreas S. <sch...@mp...> - 2006-03-22 12:57:25
|
Hi all, I'm new to jchart and want to use it for a simple bar chart in my application. I looked at the user guide and the Swing example and my code looks like this: String[] goCate = new String[data.length]; double[][] counts = new double[1][data.length]; ... DataSeries ds = new DataSeries(goCate, "GO terms", "Number of hits", "Histogram"); AxisChartDataSet axds = new AxisChartDataSet(counts, new String[]{""}, new Paint[]{Color.blue.darker()}, ChartType.BAR, new BarChartProperties()); ds.addIAxisPlotDataSet(axds); AxisChart ac = new AxisChart(ds, new ChartProperties(), new AxisProperties(), null, 300, 400); histogramFrame.setVisible(true); ac.setGraphics2D((Graphics2D) histogramPanel.getGraphics()); ac.render(); However, if I run the application I only get an empty frame without chart. Does anybody have an idea what I could be doing wrong? Thanks, Andreas |