space « BarChart « JFreeChart Q&A





3. Spacing problem when two series present in BarChart    jfree.org

Hi, I have some data that I am plotting. Here are two different scenarios: - only one type of data (so I just put it in one series), one color - two types of data (so I create two different series for it), two different colors Now the problem is that when I plot the first case (only one series) with ...

4. Space between bars in overlaid chart    jfree.org

With the XYBarRenderer, the width of the bars is controlled by the dataset, which needs to return an interval (start and end x-values) for each item. The TimeSeries/TimeSeriesCollection classes do this automatically by returning the start and end of the time period used for each item - unfortunately this means that when you plot two datasets then the bars will overlap. ...

6. Barchart : Lots of space inbetween bars. Need solution    jfree.org

Hi all, I have a bar graph that works well when there is a lot of data. But very bad when very few data. In the chart that works well, I have pairs of bars, meaning, In each category , I have two bars , as a pair, with no space inbetween them. renderer.setItemMargin(0); here I have 12 pairs of bars ...

9. I don;t want space betwwin items of barchart    jfree.org

I'm using a timeseries and don't have much control over the sampling rate, but I can duplicate samples, each of which is an 3 minute average, so I can fill up the 3 minute slot w/ average numbers, thank you. I also did a modified XYRendererFill that fills below and allows gradient paint and I get the desired result that way, ...





10. Space between bars    jfree.org

11. How to add some free space at the top of the barchart?    jfree.org

JFreeChart jfc = ChartFactory.createBarChart("123", "percent", "days", datset, PlotOrientation.VERTICAL, true, true, false); CategoryPlot plot = jfc.getCategoryPlot(); CategoryItemRenderer bren = plot.getRenderer(); bren.setSeriesPaint(0, Color.DARK_GRAY); bren.setSeriesPaint(1, Color.blue); bren.setSeriesPaint(2, Color.orange); CategoryItemLabelGenerator generator = new StandardCategoryItemLabelGenerator("{2}", new DecimalFormat("0.00")); bren.setBaseItemLabelGenerator(generator); bren.setBaseItemLabelsVisible(true); try { ChartUtilities.saveChartAsJPEG(new File("C:\\yay.jpg"), jfc, 500, ...

12. Space between bars    jfree.org

Hi, I have a XYBarChar that displays one bar per day, is there a way to create space between the bars?. I tried creating a SimpleTimePeriod from 1 to 23 o'clock, but this is not correct since it gives the impression that the bar only represents that time period. I also tried using: AxisSpace space = new AxisSpace(); space.setLeft(10); but this ...

13. Problem with spacing on bar chart    jfree.org

Problem with spacing on bar chart by mikeharvey Mon Nov 26, 2007 2:34 pm Hi, I am trying to produce a bar chart. What I need is a Horizontal bar chart that has a different colour for each bar and NO spaces between the bars. I also need a label along side each bar to show what it is and ...

15. Bar Chart not spacing bars evenly    jfree.org

I created a simple bar chart as such: dataset.addValue(120, "A", "1"); dataset.addValue(128, "A", "2"); dataset.addValue(119, "A", "3"); dataset.addValue(220, "D", "4"); dataset.addValue(120, "A", "5"); dataset.addValue(155, "B", "6"); dataset.addValue(122, "A", "7"); dataset.addValue(115, "A", "8"); dataset.addValue(185, "C", "9"); dataset.addValue(120, "A", "10"); JFreeChart chart = ChartFactory.createBarChart( "Bar Chart", "Category", "Value", dataset, PlotOrientation.VERTICAL, false, false, false but the bars are not spaced evenly along the Category ...





17. Trim bar width without space between bars    jfree.org

david.gilbert Fri Nov 09, 2007 3:52 pm If the maximum width has any effect, it will trim the width of the bars and introduce more space between them. If you want the bars right up against each other, you have to set the itemMargin to 0.0 and no maxWidth. If the bars are too wide still, you'll need a custom ...