Hi Pal
The line chart can be drawn using the drawLine()
method.The y values are ploted by geting the height of the paint area and the values of each y axis element is manapulated to get the hight of each line.
First tell me ur developing an applet or application and also the type of data ur using to draw the chart so that i can help u
-vijay
jvijaykmr@yahoo.com
Hello,
Thanks for the fast replay i'm actually developing an applet. Whereby in this applet suppose to draw lines according to the user input.
My codes are as below:
case 3:
g.drawLine(50,200,50,400);
g.drawLine(50,400,250,400);
//g.setColor(Color.red);
//g.drawLine(50,400,100,(a1a*2));
g.setColor(Color.red);
g.fillRect(300,200,20,20);
g.setColor(Color.yellow);
g.fillRect(300,230,20,20);
g.setColor(new Color(231,80,226));
g.fillRect(300,260,20,20);
g.setColor(Color.blue);
g.fillRect(300,290,20,20);
g.drawString("High Risk",330,213);
g.drawString("Medium Risk",330,243);
g.drawString("Low Risk",330,273);
g.drawString("No Risk",330,303);
break;
your help is greatly appreaciated,
thanks,
pal
Hi Palv
I coul not understand what ur doing from ur code
pls look at my applet at this site
http://www.digitaltantra.com/chart/client.htm
Let me know this is the type of chart ur doing
I am leaving for the day so
mail me to jvijaykmr@yahoo.com
bye
-vijay