How to get a vertical line betwen clusters on a bar chart.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
TMazzotta
Posts: 40
Joined: Thu Mar 27, 2003 7:11 pm

How to get a vertical line betwen clusters on a bar chart.

Post by TMazzotta » Sat Nov 04, 2006 5:32 am

I'm using JFreechart to generate a basic bar chart (bars running vertically) with 3 categories and 8 series in it.. JFreechart does put some white space to serve as a separator between the 8 clusters so each set of 3 bars is grouped), but I'd like to do one more thing:

How can I get it so it draws a vertical line betwen each cluster (so each cluster of 3 bars is separated by a vertical line), just to make it completely obvious what the different clusters are?

Thank you in advance.

homecat
Posts: 1
Joined: Wed Nov 08, 2006 4:03 am

Post by homecat » Wed Nov 08, 2006 4:14 am

JFreeChart only support a addAnnotation(CategoryLineAnnotation) method in the CategoryPlot.java,it can draw a vertical line base on this cluster.it can't draw a vertical line between two clusters.
I want do the things as you.so I override the draw() method in CategoryPlot.java.
you can try it.
but the code is diffcult to read.good luck.haha
ddd

Locked