Bar charts are easy to generate as HTML tables. For example:

<TABLE>
        <TR>
        <TD align=center>
            <table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="100%"
>
            <tr>
            <%
                int red = p.getRedPercentage();
                int yellow = p.getYellowPercentage();
                    int green = p.getGreenPercentage();
            %>
            <td WIDTH="<%= red%>%" BGCOLOR="#FF0000">
            <center><% if (red > 0) {out.print(red+"%");}%></center>
            </td>
            <td WIDTH="<%= yellow%>%" BGCOLOR="#FFFF00">
            <center><% if (yellow > 0) {out.print(yellow+"%");}%></center>
            </td>
            <td WIDTH="<%= green%>%" BGCOLOR="#00CC00">
            <center><% if (green > 0) {out.print(green+"%");}%></center>

            </td>
            </tr>
            </table>
        </TD>
        <TR>
</TABLE>


Jeff


> -----Original Message-----
> From: SANJEEVMITTAL [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 02, 2000 3:09 AM
> To: [EMAIL PROTECTED]
> Subject: Graphs using JSP?
>
>
> Hi Friends,
>
> Can we generate graphs using JSP?
>
> Lets say, I have 4 values: 10%, 30%, 55%, 5%. Can I get a Pie
> chart or Bar
> chart using JSP?
>
>
> TIA,
> Sanjeev
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to