Need simple code to show a graph of table data.

Posted on 2006-04-13
Last Modified: 2010-04-01
Hi all,

I am in a bind and I hope someone can assist me.
I need to show a basic bar graph from records in an application's table.

This graph needs to be able to display based on a recordset from a query.
I am running WebSphere 5.0 on IBM Z/OS, so I do not have authority to install any graph utility there.
This has to be done withing my application code.

Does anyone have a sample code that I could use?
I need this today, if possible.

Question by:g118481
    LVL 23

    Accepted Solution


    replace static content in the example with your record set count or any dynamic content.

    check this link to change the graph styles & other stuff.
    LVL 16

    Assisted Solution

    LVL 11

    Assisted Solution

    For simple needs i will go for CSS Bar Chart.

    If you have basic bar graph to show, css is the best way to go. U need not to be dependent on third party tools..and can be done in fairly short time.

    But, if you need more control and complex charts, JFreechart is best! (but that's third party..and it seems u don't have authority)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Suggested Solutions

    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now