ndthang
asked on
How to make a line chart or bar chart in WEB page
I want to create a line (bar) chart in my WEB page, but I don't want to use image files (gif,jpg...). How to draw line, point, circle... in page?
Thank for your answers.
Thank for your answers.
ASKER
Can I use Java or Applet? Example?
Perhaps a version 4 solution:
<table cellspacing=1 cellpadding=0 WIDTH=200>
<tr><td>-</td><td>-</td><t d>-</td><t d>-</td><t d>+</td><t d>-</td><t d>-</td><t d>-</td><t d>-</td><t d>1</td><t d>-</td><t d>-</td><t d>-</td><t d>-</td><t d>+</td><t d>-</td><t d>-</td><t d>-</td><t d>-</td><t d>2</td></ tr>
<tr><td BGCOLOR="RED" COLSPAN=12>1 </td><td BGCOLOR="WHITE" COLSPAN=8>12</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=2>2 </td><td BGCOLOR="WHITE" COLSPAN=18>2</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=3>3 </td><td BGCOLOR="WHITE" COLSPAN=17>3</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=4>4 </td><td BGCOLOR="WHITE" COLSPAN=16>4</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=14>5 </td><td BGCOLOR="WHITE" COLSPAN=6>14</td></tr>
</table>
<table cellspacing=1 cellpadding=0 WIDTH=200>
<tr><td>-</td><td>-</td><t
<tr><td BGCOLOR="RED" COLSPAN=12>1 </td><td BGCOLOR="WHITE" COLSPAN=8>12</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=2>2 </td><td BGCOLOR="WHITE" COLSPAN=18>2</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=3>3 </td><td BGCOLOR="WHITE" COLSPAN=17>3</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=4>4 </td><td BGCOLOR="WHITE" COLSPAN=16>4</td></tr>
<tr><td BGCOLOR="RED" COLSPAN=14>5 </td><td BGCOLOR="WHITE" COLSPAN=6>14</td></tr>
</table>
Watch out for the user's browser having "proportional" fonts;
all your attempts to "draw" using "fixed-pitch" text-characters
will not align.
all your attempts to "draw" using "fixed-pitch" text-characters
will not align.
how about making the crart in windows/access/excel andi nporting it into the HTML page
Why not:
<p> I am kessy
</p>
<hr size="10"> (size you can moderate your own)
I just created a bar.
(Then you get a line, bar, or:)
hr color="#0000FF" size="10">
Then your bar is colored without using a picture.
Kessyclown
<p> I am kessy
</p>
<hr size="10"> (size you can moderate your own)
I just created a bar.
(Then you get a line, bar, or:)
hr color="#0000FF" size="10">
Then your bar is colored without using a picture.
Kessyclown
ASKER
All of you don't understand my question.
I want to create a chart (same the chart in Excel). If using image files, size of them is too big. Is there any way to draw that chart by modify some data ( some numbers).
You can program in Java or Applet.
I want to create a chart (same the chart in Excel). If using image files, size of them is too big. Is there any way to draw that chart by modify some data ( some numbers).
You can program in Java or Applet.
Why is it "too big" ??
Modems are getting faster, and LAN-connections are fast,
so downloading an image should be no problem.
Disk-space is getting cheaper, so storing the image
should be no problem, either.
Modems are getting faster, and LAN-connections are fast,
so downloading an image should be no problem.
Disk-space is getting cheaper, so storing the image
should be no problem, either.
What do you mean "too big"
i suggested you use a 1x1 pixel image, you can hardly call that big.
But if you want to use Java, you can, there are a lot of applets around which show graphs based on numbers you put in parameters.
One comes with the JDK 1.02, it's called chart.class, see http://www.whatrain.com/javatest/sun/barchart/chart.html
I have found it very quickly on the wen by search for "chart.class" +applet.
A search for "barchart.class" or whatever you think people might call such an applet will give you numerous webpages, and sure some of them will comtain what you want.
i suggested you use a 1x1 pixel image, you can hardly call that big.
But if you want to use Java, you can, there are a lot of applets around which show graphs based on numbers you put in parameters.
One comes with the JDK 1.02, it's called chart.class, see http://www.whatrain.com/javatest/sun/barchart/chart.html
I have found it very quickly on the wen by search for "chart.class" +applet.
A search for "barchart.class" or whatever you think people might call such an applet will give you numerous webpages, and sure some of them will comtain what you want.
ASKER
despair
ASKER
despair
Hmm, if none understands your question, then maybe you should try and rephrase it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want to know the way I'll go on is true, so I accepted that answer. If you know how to make it, I'll thank very much. I am a beginer, so I hope you help me (if you known).
ASKER
Thank
Hey! I just answered his answer and clearly made his way because I saw some people didn't understand very well. Therefore, I try to clear his question. I think we just want to help others solve their problems. I always appreciate other experts's help that really help me a lot. Of course, if he needs more help, he can ask me more and I will surely reply!!
Example:
<table cellspacing=1 cellpadding=0>
<tr valign=bottom bgcolor=#ffffcc>
<td><img src=dot_red.gif width=12 height=120></td>
<td><img src=dot_red.gif width=12 height=71></td>
<td><img src=dot_red.gif width=12 height=81></td>
<td><img src=dot_red.gif width=12 height=114></td>
<td><img src=dot_red.gif width=12 height=150></td>
<td><img src=dot_red.gif width=12 height=136></td>
<td><img src=dot_red.gif width=12 height=119></td>
<td><img src=dot_red.gif width=12 height=134></td>
<td><img src=dot_red.gif width=12 height=67></td>
<td><img src=dot_red.gif width=12 height=66></td>
<td><img src=dot_red.gif width=12 height=109></td>
</tr>
</table>