Borders of Category Markers
Borders of Category Markers
Hello,
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.
Greetings,
Christian Trost
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.
Greetings,
Christian Trost
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Borders of Category Markers
Upload an image of your chart to one of the free image hosters, then post a link to the image here.
Re: Borders of Category Markers
Here is a screenshot of my problem. http://fs5.directupload.net/images/171128/t5i5ogff.png
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Borders of Category Markers
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.
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.
Re: Borders of Category Markers
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?
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Borders of Category Markers
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.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?
Re: Borders of Category Markers
Ok. I thought about if it could be possible to make the CategoryMarker wider than the category itself. But that's only possible if I change the source code for drawing the domain marker or?
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Borders of Category 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.
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.
Re: Borders of Category Markers
I will look at it. Thank you for this information.