[ jcharts-Bugs-1028516 ] LineChart shape cannot be null
"SourceForge.net" <[email protected]> Fri, 22 Oct 2004 19:13:22 -0700
| Newsgroups | gmane.comp.krysalis.jcharts.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1028516, was opened at 2004-09-15 08:10
Message generated for change (Comment added) made by nathaniel_auvil
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=116161&aid=1028516&group_id=16161
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: MoMaT (momat)
Assigned to: Nathaniel G. Auvil (nathaniel_auvil)
Summary: LineChart shape cannot be null
Initial Comment:
The following code from userGuide 0.3.0, true for 0.7.5
is no longer valid for 1.0.0-alpha-1 if the legend is used:
Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE,
null };
LineChartProperties lineChartProperties= new
LineChartProperties( strokes, shapes );
Giving the one of shapes array shape value of null (to
render a flat line without any triangles, circles or
such) and setting the legend visible, makes the chart
impossible to render:
java.lang.NullPointerException
at org.krysalis.jcharts.Legend.render(Unknown Source)
I quess the new way of rendering the lineChart icon in
a legend (line+shape instead of box) is the cause of
this, since it is probably not null protected.
----------------------------------------------------------------------
>Comment By: Nathaniel G. Auvil (nathaniel_auvil)
Date: 2004-10-22 22:13
Message:
Logged In: YES
user_id=118938
sigh...
This legend code is completely broken. The code people
added to draw the line icons is just wrong. I am going to
have to rewrite the code.
----------------------------------------------------------------------
Comment By: Nathaniel G. Auvil (nathaniel_auvil)
Date: 2004-10-22 12:44
Message:
Logged In: YES
user_id=118938
shit, you are right. I was getting mixed up with the Point
Chart and how you have a fill Paint and an Outling Paint.
----------------------------------------------------------------------
Comment By: MoMaT (momat)
Date: 2004-10-22 12:08
Message:
Logged In: YES
user_id=829758
I've applied such a temporary patch in Legend.java line 506:
>>
if( this.shapes.size() > 0 && this.shapes.size() >
labelIndex )
<<
if( chartType != ChartType.LINE && this.shapes.size() > 0
&& this.shapes.size() > labelIndex )
It preserves v.0.7 legend behaviour.
BTW, doesn't making the paint transparent prevent the line
from being drawn?
----------------------------------------------------------------------
Comment By: Nathaniel G. Auvil (nathaniel_auvil)
Date: 2004-10-22 11:36
Message:
Logged In: YES
user_id=118938
Half way to having a fix to this.
----------------------------------------------------------------------
Comment By: Nathaniel G. Auvil (nathaniel_auvil)
Date: 2004-10-19 16:16
Message:
Logged In: YES
user_id=118938
A work-around for this would be to just use a shape and make
the Paint transparent.
----------------------------------------------------------------------
Comment By: Nathaniel G. Auvil (nathaniel_auvil)
Date: 2004-10-17 20:38
Message:
Logged In: YES
user_id=118938
Yeah, i see the legend wants to have a Shape in there. I
will make a fix for this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=116161&aid=1028516&group_id=16161
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl