java - How to generate a bar chart in JFreeChart with default components' size? -
I'm trying to create a bar chart, but by calculating the size of the label from my domain axis width and is forced to control the height and cause problems when they are too big (to get in the middle of the column at the beginning of 'values chart).
Do you have any suggestions?
Thank you.
You can change the renderer on the chart by the graphics repaints a custom painter; The Painter
code is not displayed correctly.
GradientXYBarPainter xyBarpainter = new GradientXYBarPainter () {@Override public void paintBar (Graphics2D G2, XYBarRenderer renderer, int I have a widthMultiplier used row, int column, RectangularShape time, RectangleEdge basis) {Rectangle2D rect = bar.getFrame (); Raktksetrekt (Raktkgets (), Raktkgeti (), Raktkgetvidth () * Vidthamultipliar, Raktkgetheigt ()); Bar.setFrame (Rect); Super Paintbar (G2, Renderer, Row, Column, Bar, Base); }}; StackedXYBarRenderer rend = new StackedXYBarRenderer (); Rend.setBarPainter (xyBarpainter);
Comments
Post a Comment