From: Lapinski, M. (Research) <lap...@cr...> - 2003-08-27 13:17:43
|
Well in my case ill have to do the following: - implement the PreAxisValueRenderListener - pass it to the BarChartProperties using addPreRenderEventListener() What I not clear on is how to access the given Paints that are passed in the array. What id like to do is make use of the array of Paints so that position in the array corresponds to the Color sitting in the array. So for example the preRender() method would look like this: axisValueRenderEvent.getGraphics2D.setPaint(Paints[axisValueRenderEvent.getD ataSetIndex()]); The questions that remain are: - how to access the array of paints in the preRender() method? - does dataSetIndex correspond to the position of the piece of data in the data array? Ie data {{5, 10,15}} when the event comes with dataSetIndex of 1 this is the event for value 15? -thank you -mtl -----Original Message----- From: Nathaniel G. Auvil [mailto:nat...@ya...] Sent: Wednesday, August 27, 2003 8:44 AM To: jch...@li... Cc: lap...@cr... Subject: RE: [jCharts-users] AxisChartDataSet Constructor paints parameter Some other charts need an Array. Could we have overloaded the Constructor...sure. in your case, simply pass: new Paint[]{ Color.blue } --- "Lapinski, Michael (Research)" <lap...@cr...> wrote: > Ok, > Then why is it that an array of Color's > is passed as a param? not just one Color? > > Again I am not subscribed to the list so > please make sure my email addr is included > in any reply. (lapinski<AT>research.ge.com) > > -thank you > -mtl > > > -----Original Message----- > From: Nathaniel G. Auvil [mailto:nat...@ya...] > Sent: Tuesday, August 26, 2003 12:15 PM > To: jch...@li... > Cc: lap...@cr... > Subject: Re: [jCharts-users] AxisChartDataSet Constructor paints parameter > > > > If you are plotting a bar chart, only one Paint is needed/used; it is > at the dataset level. If you want each bar to have its own Paint, you > would need to implement the: > org.jCharts.axisChart.customRenderers.axisValue.PreAxisValueRenderList > ener > Interface to assign a different Paint to each bar. > > > > --- "Lapinski, Michael (Research)" <lap...@cr...> wrote: > > Hello, > > Let me preface with the fact that I am not subscribed > > to the list so please include my email in any replies. > > If you dont see it the addr is (lapinski<AT>research.ge.com). > > > > > > Can someone elaborate on how the java.awt.Paint[] paints param is > > mapped when the graph is actually drawn? > > > > if i have an array of data {{1,2,3,4}} > > > > and i pass the paints as {Color.red, Color.green, > > Color.pink, Color.black} > > > > can i assume the bar for 1 will be red, bar for 2 > > will be green and so on? > > > > -thank you > > -mtl > > > > -------------------------------------------------- > > Michael Lapinski > > Computer Scientist > > GE Research > > > > > > "I think there is a world market for maybe five computers." > > - IBM Chairman Thomas Watson, 1943 > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: VM Ware > > With VMware you can run multiple operating systems on a single > > machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual > > machines at the same time. Free trial click > > here:http://www.vmware.com/wl/offer/358/0 > > _______________________________________________ > > jCharts-users mailing list > > jCh...@li... > > https://lists.sourceforge.net/lists/listinfo/jcharts-users > > > ===== > http://nathaniel-auvil.blog-city.com/ > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > jCharts-users mailing list jCh...@li... > https://lists.sourceforge.net/lists/listinfo/jcharts-users ===== http://nathaniel-auvil.blog-city.com/ __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |