View Single Post
  #8 (permalink)  
Old 11-02-2007, 08:21 AM
ravindarjobs ravindarjobs is offline
Member
 
Join Date: Oct 2007
Posts: 7
ravindarjobs is on a distinguished road
Great.........
Amazing..........


now it suits well to my requirement.
Thank you.

shall i ask you one doubt again?

Y-axis values span in the range of 0-max.

but suppose the values are like this

Value

23
134
650
33

here my my max value is 650, and since the intervals of y-axis is 1, you can imagine how many intervals will come, and y-axis values span very very closely and we cant understand them.

so i have tried to change the the labels on the Y-axis as some thing like this

Code:
for(int i=0;i<data.length;i++) { String s = String.valueOf(data[j]); float y = (float)(PAD + j*yInc + lm.getDescent()); float width = (float)font.getStringBounds(s, frc).getWidth(); float x = (float)(PAD - TICK - STICK - width); g2.drawString(s, x, y); }
but i could not make a solution.

my view is i have the values as said above.
there are four values.
and the max value is 650.
so now divide 0-650 few intervals
and then now span the graph.

i have seen this type of graphs in ms access. and thats why my thought have gone like this.

suppose the year and values goes like this in the image below


the graph should go like this below



I hope you have orkut account.


Thank you

Last edited by JavaBean : 11-02-2007 at 11:35 AM. Reason: Code placed inside [code] tag!
Reply With Quote