Bug:CandlestickRenderer ignores setBaseCreateEntities(false)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

Bug:CandlestickRenderer ignores setBaseCreateEntities(false)

Postby RoyW » Sat May 10, 2008 8:12 am

JFreeChart 1.0.9....
Looking at the source for CandlestickRenderer you can see that the drawItem() method does not check this flag for creating entities and always creates them...
from drawItem() in CandlestickRenderer, line 847 to ...
Code: Select all
        // add an entity for the item...
        if (entities != null) {
            String tip = null;
            XYToolTipGenerator generator = getToolTipGenerator(series, item);
            if (generator != null) {
                tip = generator.generateToolTip(dataset, series, item);
            String url = null;
            if (getURLGenerator() != null) {
                url = getURLGenerator().generateURL(dataset, series, item);
            XYItemEntity entity = new XYItemEntity(body, dataset, series, item,
                    tip, url);

As a note: it would be nice if CandlestickRenderer did like other renderers and moved the generating of entities to a protected method so it could be overriden by extending classes without having to override the whole "drawItem" method.

(It looks like it doesn't check any flags, even the "per series" flags.)
Posts: 93
Joined: Wed Apr 23, 2008 7:42 pm

Postby david.gilbert » Mon May 12, 2008 4:44 pm

Thanks for the report. I added a bug to the database at SourceForge to track this:

https://sourceforge.net/tracker/index.p ... tid=115494

It should be easy to fix.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
JFreeChart Project Leader
Posts: 11664
Joined: Fri Mar 14, 2003 10:29 am

Return to JFreeChart

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests