View Full Version : Chart x label orientation

04-17-2007, 07:38 AM

I want to change the orientation of the category labels in a Bar Chart, the text is being truncated.

The <category-label-rotation>45</category-label-rotation> tag seems to be ignored in my .widget.xml file.

I've read that this may not actually be supported, where could I make modifications to allow me to specify this? I'm using Pentaho 1.2 and the ChartHelper API.


04-17-2007, 10:54 AM
Unfortunately, the code for support for category-label-rotation seems to have gone missing (from my search results). You can add this functionality to the codeline by adding the necessary JFreeChart code to the org.pentaho.plugin.jfreechart.JFreeChartEngine class, and adding support for the XML definition in the org.pentaho.plugin.jfreechart.CategoryChartDefinition class. Follow the "domain-label-rotation" string through the code, that will point you to a similar feature that is implemented much the same way as the category-label-rotation feature.

Should you choose to implement this feature, please send over the code, and we can check it into the main codeline. If not, we should have extensions to chart dunctionality coming up on our roadmap in the near future. this would fall under that umbrella.

Hope this helps,

04-18-2007, 12:07 PM
Ok, looks like we'll need this functionality along with a couple of other options, I'll have a go at modifying the code and send you the results.


05-07-2007, 07:17 AM
Hello Mark,

I ran into the same problem and was just about tho start to implement the same functionality and maybe some others. I was wondering if you have already submitted the changes? If yes, would it be possible to get the source code in advance?

Thank you and all the best,

05-08-2007, 05:05 AM
Hi Ingo,

work has been mad busy lately so I haven't had a chance to look in to this further, I did discover last week however that the following would achieve some of what I was looking for:


That might help you in the mean time.


05-08-2007, 06:16 AM
Hi Mark,

thanks for your help. That worked for me.

Just as another hint. From what I could tell the rotation has to be defined in radiant, not degrees. e.g 45° = 0.25 radiant.

Here is a link with a degree/radiant converter: http://wolf.galekus.com/viewpage.php?page_id=10.

All the best,