From: Nathaniel G. A. <nat...@ya...> - 2004-10-01 03:21:14
|
when you call: yAxis.setRoundToNearest(0), you are telling it to round to the nearest 10 to the zero'th power, or the nearest whole number. if you used the call: yAxis.setRoundToNearest(-3), that would say round to the nearest 10^-3, or .001. Looks like you might want to round to the nearest 10^-6 --- "Liu, Louis (Exchange)" <LL...@Be...> wrote: > > Hi, Nathaniel: > > I did yAxis.setUserDefinedScale( 0, 0.000001); and > yAxis.setRoundToNearest(0); I also set yAxis.setNumItems((int)maxY +2); > and this seems to have made it work (Note: maxY is the maximum of Y > data). I have also attached a code section below. I did read the User's > guide downloaded from the Web but yet to experience more to utilize many > classes of JCharts. Can you tell me how I can use ScaleCalculator to > adjust the Y-axis scale? What is the difference between Auto- and > UserDefinedScaleCalculator ? Commented code did not work as expected. > Can you see why? > > AxisProperties axisProperties= new AxisProperties(); > DataAxisProperties yAxis= (DataAxisProperties) > axisProperties.getYAxisProperties(); > > // UserDefinedScaleCalculator myScaleCalculator = new > UserDefinedScaleCalculator(0.0, 0.001); > // myScaleCalculator.setMinValue(0); > // myScaleCalculator.setMaxValue(maxY); > // myScaleCalculator.computeScaleValues(); > // yAxis.setScaleCalculator(myScaleCalculator); > //((DataAxisProperties)axisProperties.getYAxisProperties()).setUserDefin > edScale(0, maxY); > > LegendProperties legendProperties= new LegendProperties(); > > Dimension dimension=jPanel_Graph.getSize(); > AxisChart axisChart= new AxisChart( dataSeries, > chartProperties, axisProperties, legendProperties, dimension.width, > dimension.height ); > > > > -----Original Message----- > From: jch...@li... > [mailto:jch...@li...] On Behalf Of > Nathaniel G. Auvil > Sent: Tuesday, September 28, 2004 7:32 PM > To: jch...@li... > Subject: Re: [jCharts-users] Y-Axis range - How is it set ? > > > what is your rounding factor set to? Did you take a look at the users > guide? > > > > --- "Liu, Louis (Exchange)" <LL...@Be...> wrote: > > > I have just created a line chart. My data values are all less that 1, > > ranging from 0.01 to 0.8. The Y axis scale is always 0 to 4 which > makes > > my chart lie low and leave a large portion of empty space above it. > How > > is the Y axis range is calculated? How do I override it? > > > > > > > > Louis > > > > > > > > > > *********************************************************************** > > Bear Stearns is not responsible for any recommendation, solicitation, > > offer or agreement or any information about any transaction, customer > > account or account activity contained in this communication. > > > *********************************************************************** > > > > > > > > > _______________________________ > Do you Yahoo!? > Declare Yourself - Register online to vote today! > http://vote.yahoo.com > > > ------------------------------------------------------- > 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 > _______________________________________________ > jCharts-users mailing list > jCh...@li... > https://lists.sourceforge.net/lists/listinfo/jcharts-users > > > *********************************************************************** > Bear Stearns is not responsible for any recommendation, solicitation, > offer or agreement or any information about any transaction, customer > account or account activity contained in this communication. > *********************************************************************** > > > > ------------------------------------------------------- > 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 > _______________________________________________ > jCharts-users mailing list > jCh...@li... > https://lists.sourceforge.net/lists/listinfo/jcharts-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |