I wanted to integrate Category Markers at my bar chart and used the example source code of "CategoryMarkerDemo2.java" for creating these. I am using 3D Bar Charts and I got markers which do not include the whole bars and they are so much smaller than the other ones.

I wanted to get different background colors for each category. Is there any chance to increase the width of Category Markers? I don't want to decrease the space between the categories.

Btw: Is it possible to upload a screenshot of my diagram? So It's easier to show you my problem.

I can't say that I have understood exactly what is wrong. I assume that the medium gray areas, that can hardly be distinguished from the plot walls, are the markers?I checked the code for BarRenderer3D, and this renderer doesnot override drawDomainMarker (which it should).I can only advice to have a look at the drawRangeMarker method of BarRenderer3D, understand how the 3D effect is created, and then write a correct drawDomainMarker method.Personally, I do not use the pseudo-3D feature of JFreeChart, so I can't help directly.

Yes, the medium gray areas are the markers. I wanted to get a different color for each category to make it easier to understand the diagram. If I don't use the 3D BarRenderer, is it possible to change the width of the markers that it has the same width like the areas without marker?

chrisTr wrote:If I don't use the 3D BarRenderer, is it possible to change the width of the markers that it has the same width like the areas without marker?

A CategoryMarker will either be drawn as a line or as a rectangle, depending on the return value of getDrawAsLine(). The rectangle will cover the entire space of a category. All categories have the same widths by default. There is no difference between categories with and without markers.

Alternatively, you can write a custom CategoryAnnotation that is doing the job. IN this way, you do not have to change the source code of JFreeChart.Some time ago, I have written a set of annotations that can serve as marker replacements. Here is a link to the forum thread, where you will find a link to the patch.