askhat.salikhov Posted May 28, 2008 Share Posted May 28, 2008 Hey there! I need to generate a bar chart, where bar shapes of the chart are bordered with a line (border) in a particular color. Besides, I want to be able to specify the width of the border and the painting color. Does anyone know if it is doable? Thanks a lot. Link to comment Share on other sites More sharing options...
lucianc Posted May 30, 2008 Share Posted May 30, 2008 You ca do this with a chart customizer:Code:public class BarChartCustomizer implements JRChartCustomizer { public void customize(JFreeChart chart, JRChart jasperChart) { BarRenderer renderer = (BarRenderer) chart.getCategoryPlot().getRenderer(); renderer.setDrawBarOutline(true); renderer.setOutlinePaint(Color.MAGENTA); renderer.setOutlineStroke(new BasicStroke(3)); }} HTH,Lucian Link to comment Share on other sites More sharing options...
askhat.salikhov Posted May 30, 2008 Author Share Posted May 30, 2008 Hello Lucian, Thank you for your help. Very much appreciated! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now