Reducing Width of bar and series key in the side

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

Reducing Width of bar and series key in the side

Post by sumanseshadri » Wed Mar 29, 2006 12:18 am

Hi,

I have 2 questions.

1. How do I reduce the width of the bar. I want them to be thinner.
Using renderer.setMaximumBarWidth(); doesnt seem to make a difference.

2. Right now my series (key for the graph) is displayed very nicely inside a box at the bottom of the chart.
Is there any way by which we can make the key come in the side vertically?

Thanks,
Suman

sachinkt
Posts: 5
Joined: Thu Apr 06, 2006 1:31 pm

Post by sachinkt » Thu Apr 06, 2006 1:48 pm

try this

CategoryPlot categoryplot = chart.getCategoryPlot();
BarRenderer barrenderer = (BarRenderer)categoryplot.getRenderer();
barrenderer.setMaxBarWidth(0.015f);

sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

Post by sumanseshadri » Thu Apr 06, 2006 8:30 pm

It works . Thanks !

Locked