Bug:CandlestickRenderer ignores setBaseCreateEntities(false)

A free public discussion forum for the JFreeChart class library.

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);
            entities.add(entity);
        }



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.)
RoyW
 
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
david.gilbert
JFreeChart Project Leader
 
Posts: 11383
Joined: Fri Mar 14, 2003 10:29 am


Return to JFreeChart - General

Who is online

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