From: SourceForge.net <no...@so...> - 2004-10-22 16:08:26
|
Bugs item #1028516, was opened at 2004-09-15 14:10 Message generated for change (Comment added) made by momat 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: MoMaT (momat) Date: 2004-10-22 18: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 17: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 22: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-18 02: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 |