Re: Gradient on each bar rather than across entire graph
"Nathaniel G. Auvil" <[email protected]> Mon, 20 Sep 2004 13:47:35 -0700 (PDT)
| Newsgroups | gmane.comp.krysalis.jcharts.user |
|---|---|
| Message-ID | <[email protected]> |
why set the Paint n times, when you can set it once? The thought at the time was there would be a single Paint per dataset you could just have a member which counts? I think the index is passed in too. --- Travis Reeder <[email protected]> wrote: > I don't think this will work very well for me since the paints are set > dynamically while creating the graph, so how would I get at which > paint is for which bar from the preRender method? I would need a > axisValueRenderEvent.getPaint() or something. > > Why doesn't jcharts just set the paint for each bar it draws? Or > another way of putting that is why does it have the current behaviour? > > Travis > > > On Mon, 13 Sep 2004 14:34:45 +1200, Chris McKay <[email protected]> wrote: > > Of course you wouldn't set the Paint again!! Better code follows... > > > > > > > > public void preRender( AxisValueRenderEvent axisValueRenderEvent ) > > { > > // overwrite color if range test > > double value = axisValueRenderEvent.getiAxisChartDataSet().getValue( > > > > axisValueRenderEvent.getDataSetIndex(), > > > > axisValueRenderEvent.getValueIndex() > > ); > > if (value > loRange && value < hiRange) { > > axisValueRenderEvent.getGraphics2D().setPaint( > > this.inRangePaint ); > > } > > } > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > jCharts-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/jcharts-users > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > jCharts-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jcharts-users > _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php