Bar chart in jsp

Hi,
I want to develop bar charts using JSP.
Can you please tell me the simplest way so that I can develop bar charts.
Thanks

If you want, you could draw the charts using the HTML5 canvas tag with some JavaScript to draw the chart on the canvas. Though if I remember correctly, to get this to work in IE6, you need to include the excanvas script on your page; not sure about IE7 and IE8.
I make no claims as to whether this is a good approach for what you are doing, but it's another option.

Similar Messages

  • Generating JFreeChart Bar chart in jsp

    Hi Everyone,
    I have never worked with charts earlier. I created one demo for generating a bar chart using a java class. I am using awt classes here. Chart was rendered successfully on running this java class. My problem is i want to integrate this class with a JSP, by involving servlets. I tried to do it many a times now but yet not successfull.
    My requirement is, on the hit of 'generate chart' in one jsp, bar chart should be rendered.
    Can somebody plz help???
    Thanks in advance

    Has no update on the problem mentioned. However, you can try elegantj charts. It creates customized, dynamic charts in few minutes.
    Link: www.elegantjcharts.com

  • How to display bar charts in jsp

    I need bar charts for web application.
    I search alot but I didn't find any solution.
    From where I can find the content for same?

    You're right I did read about Cewolf. Here's how
    You can simply define a chart by including a chart tag into your JSP like this:
    <cewolf:chart
    id="XYChart"
    type="xy"
    title="XYChart"
    <cewolf:gradient>
    <cewolf:point x="0" y="0" color="#FFFFFF"/>
    <cewolf:point x="0" y="300" color="#C8C8C8"/>
    </cewolf:gradient>
    <cewolf:data>
    <cewolf:producer id="xyData"/>
    </cewolf:data>
    </cewolf:chart>
    <cewolf:img chartid="XYChart" renderer="cewolf" width="400" height="300"/>
    keep coding..
    Ciao.
    Div

  • Creating Bar Charts using Java and Display in jsp

    Hi..Is it possible to create a servlet that processes data from database and display the values as Bar Charts in jsp pages. If its possible, is there any examples on how to achieve that?

    I don't get it. You already know what needs to be done to solve your problem, the only thing you are missing is the HOW. That's the easy part, if only you break down what you have to know:
    1) how do I show an image on a website (this is a basic HTML question actually, not actually related to servlets/JSPs directly)
    2) how do I fetch the path from a database (JDBC question) so that I can use this path to link to my image on disc
    So what is preventing you from figuring out how to do these two simple tasks? Some clever google searches should give you all the information you need in no time.
    by the way: are you sure that you need to store these paths in the database? Is this part of some file upload component?

  • Displaying BAR chart using JSPChart , Sysbase database, Jrun server

    I would like to explain my requirements to you.
    1. I will be displaying a Exponential bar chart. The length of bar chart is obatined from Sybase database.
    2. This chart should be dynamically created depending on the value on the database and x -axis is exponential.
    This will be displayed on a HTML page.
    Hope this is clear. Basically, I want to show the database values using a chart on a Web Page.
    Can this be done, if so, pl give me further info if possible.
    I have downloaded JSP chart from
    http://www.javaside.com/asp/menu_fr.asp?page=jspChart.shtml
    Pl reply ASAP.
    Thanks in advance

    Serious fraud allegations leveled against Elansoft, in the web pages: http://www.manero.org/weblog/archives/000083.html
    or
    http://archives.real-time.com/pipermail/cocoon-users/2003-March/031298.html .
    If the charges were not true, Elansoft might have angrily denied. Instead, Elansoft closed US office and ran from the law. If Elansoft continue to evade the laws, what kind of legal protection buyers could get from the legal system?
    These are credible charges, because, it is impossible to believe Agileblox could get more votes than OpenOffice (which has been downloaded by millions of users) and more votes than SVG-technology itself (which has support of tens of thousands of die hard developers, and many companies building products around the technology).
    In the news release, Pravin Raju, CEO, said Agileblox rated higher than products from Sun, Oracle and Macromedia:
    http://www.blonnet.com/bline/2002/10/11/stories/2002101101590900.htm
    The CEO may be ignorant enough to know, that all those products are well known and financially successful. There were hundreds of news article published in respected technology journals about each one of them. There are many developer groups (Ex: user-groups and discussion forums) about each of them. Each of these forums patronized by thousands of developers each month.
    Is there any detailed product review for Agileblox out there? How about any freelance discussion? May be too stupid to participate in technical debate? What about, at least one use case presentation from a �real- happy customer? The crooks committed fraud. Pravin Raju, CEO of Elansoft, shamelessly claimed his product had rated higher than many respected products. What a moron?
    Look at Agileblox documentation and flowchart. Does the flowchart make any sense, or look like work of a software guy? Does Elansoft know any thing about product development? Why they have not able to release any upgrade to Agileblox for so long? Who developed Aileblox? Are they still working at Elansoft?
    P.S: Please send any information and names of the players of the Award scam to: [email protected]

  • Displaying graphical representation of data in hash tables as bar chart?

    I want to be able to display results in my hash table as a bar chart i don't know how to do it could someone help me I've looked through tutorials couldn't find any information that actually helped.
    In my program it doesnt allow matching the capital and small letters
    so for instance if I already have Mike it allows for me to input mike in again so there are 2 Mikes.
    I also want to do a simple user interface the tutorial for it is not simple to understand could any one tell me how to create a simple user interface like putting a button into a place wher i want it to be.
    im not asking anyone to do it for me i just want people to show me how to do it
    thank you
    Edited by: Tek_Hedef on Dec 1, 2007 4:30 AM

    Thanks for the ideas pal but I did have a go at it but my bit of code is making it crash but i removed it now so here's what I have so far
    import java.io.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    class StudentDetails extends JFrame implements ActionListener
         private JTextField StudentNameTxt, StudentMarkTxt;
        private JButton DeleteStudentDetailsBtn, DisplayAllStudentsBtn, SearchStudentBtn, FailedStudentsBtn, PassedStudentsBtn, DistinctionStudentsBtn, AddStudentDetailsBtn, ExitBtn;
        private JPanel DisplayStudentDetailsPnl;
        private JLabel StudentNameLbl, StudentMarkLbl;
        private JTextArea DisplayResultsTxt;
        private Hashtable StudentDetailsTbl;
        private String StudentName, StudentMark;
        public static void main(String[] args)
            StudentDetails frame = new StudentDetails();
             frame.setSize(600,600);
            frame.createGUI();
            frame.setVisible(true);
        public void display(JPanel DisplayStudentDetailsPnl)
            Graphics paper = DisplayStudentDetailsPnl.getGraphics();
            paper.setColor(Color.white);
            paper.fillRect(0, 0, 500, 500);
            paper.setColor(new Color((int)(Math.random()*255),(int)(Math.random()*255),(int)(Math.random()*255) ));
        private void createGUI()
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            Container window = getContentPane();
            window.setLayout(new FlowLayout());
            StudentDetailsTbl = new Hashtable();
            StudentNameLbl = new JLabel("Student Name");
            window.add(StudentNameLbl);
            StudentNameTxt = new JTextField(15);
            window.add(StudentNameTxt);
            StudentMarkLbl = new JLabel("Student Mark");
            window.add(StudentMarkLbl);
            StudentMarkTxt = new JTextField(3);
            window.add(StudentMarkTxt);
            AddStudentDetailsBtn = new JButton("Add Student and Mark");
            window.add(AddStudentDetailsBtn);
            AddStudentDetailsBtn.addActionListener(this);
            DeleteStudentDetailsBtn = new JButton("Delete Student");
            window.add(DeleteStudentDetailsBtn);
            DeleteStudentDetailsBtn.addActionListener(this);
            DisplayAllStudentsBtn = new JButton("Display all Students and Marks");
            window.add(DisplayAllStudentsBtn);
            DisplayAllStudentsBtn.addActionListener(this);
            SearchStudentBtn = new JButton("Search Student");
            window.add(SearchStudentBtn);
            SearchStudentBtn.addActionListener(this);
            FailedStudentsBtn = new JButton("Students which Failed");
            window.add(FailedStudentsBtn);
            FailedStudentsBtn.addActionListener(this);
            PassedStudentsBtn = new JButton("Students which Passed");
            window.add(PassedStudentsBtn);
            PassedStudentsBtn.addActionListener(this);
            DistinctionStudentsBtn = new JButton("Students with Distinction");
            window.add(DistinctionStudentsBtn);
            DistinctionStudentsBtn.addActionListener(this);
            ExitBtn = new JButton("Exit");
            window.add(ExitBtn);
            ExitBtn.addActionListener(this);
            DisplayResultsTxt = new JTextArea();
            DisplayResultsTxt.setPreferredSize(new Dimension(200, 200));
            DisplayResultsTxt.setBackground(Color.white);
            window.add(DisplayResultsTxt);
            DisplayResultsTxt.enable(false);
        public void actionPerformed (ActionEvent e)
             if (e.getSource()== AddStudentDetailsBtn)
                  StudentName = StudentNameTxt.getText();
                   StudentMark = StudentMarkTxt.getText();
                  DisplayResultsTxt.setText("");
                  StudentDetailsTbl.put(StudentName, StudentMark);
                Enumeration enumStudentName = StudentDetailsTbl.keys();
                Enumeration enumStudentMark = StudentDetailsTbl.elements();
                String[] keys = (String[]) StudentDetailsTbl.keySet().toArray(new String[0]);       
                Arrays.sort(keys); 
                    for (String key : keys)
                         DisplayResultsTxt.append(key + " : " + StudentDetailsTbl.get(key)+ "\n");
                    StudentNameTxt.setText("");
                    StudentMarkTxt.setText("");
             if (e.getSource() == DeleteStudentDetailsBtn )
             if (StudentDetailsTbl.containsKey(StudentNameTxt.getText().trim()))
                  DisplayResultsTxt.setText("");     
                  String txt = StudentNameTxt.getText();
                Enumeration enumStudentName = StudentDetailsTbl.keys()  ;                   
                    String currentelement = (String)enumStudentName.nextElement();
                     StudentDetailsTbl.remove(txt);
                     DisplayResultsTxt.append(txt + " has been deleted");  
            if (e.getSource() == SearchStudentBtn)
            if (StudentDetailsTbl.containsKey(StudentNameTxt.getText().trim()))
                 String txt = StudentNameTxt.getText();
                 String result;
                 DisplayResultsTxt.setText("");
                 Enumeration enumStudentName = StudentDetailsTbl.keys();
                Enumeration enumStudentMark = StudentDetailsTbl.elements();
                   while (enumStudentName.hasMoreElements())
                        String currentelement = (String)enumStudentName.nextElement();
                    result = (StudentDetailsTbl.get(currentelement).toString());
                        if (txt.equals(currentelement))
                             DisplayResultsTxt.append(currentelement + " " + result);
                        else JOptionPane.showMessageDialog(null, "Student Name could not be identified");
            if (e.getSource() == DisplayAllStudentsBtn)
                  DisplayResultsTxt.setText("");
                 Enumeration enumStudentName = StudentDetailsTbl.keys();
                Enumeration enumStudentMark = StudentDetailsTbl.elements();
                while (enumStudentName.hasMoreElements())
                DisplayResultsTxt.append(enumStudentName.nextElement()+ " " + enumStudentMark.nextElement()+ "\n");
            if (e.getSource() == PassedStudentsBtn)
                 DisplayResultsTxt.setText("");
                 Enumeration enumStudentName = StudentDetailsTbl.keys();
                Enumeration enumStudentMark = StudentDetailsTbl.elements();
                while (enumStudentName.hasMoreElements())
                     int Mark = Integer.parseInt((String)enumStudentMark.nextElement());
                     String Name = (String)enumStudentName.nextElement();
                     if (Mark >=40)
                          DisplayResultsTxt.append(Name + " " + Mark + "\n");
            if (e.getSource() == FailedStudentsBtn)
                 DisplayResultsTxt.setText("");
                 Enumeration enumStudentName = StudentDetailsTbl.keys();
                Enumeration enumStudentMark = StudentDetailsTbl.elements();
                while (enumStudentName.hasMoreElements())
                     int Mark = Integer.parseInt((String)enumStudentMark.nextElement());
                     String Name = (String)enumStudentName.nextElement();
                     if (Mark <40)
                          DisplayResultsTxt.append(Name + " " + Mark + "\n");
            if (e.getSource() == DistinctionStudentsBtn)
                 DisplayResultsTxt.setText("");
                 Enumeration enumStudentName = StudentDetailsTbl.keys();
                Enumeration enumStudentMark = StudentDetailsTbl.elements();
                while (enumStudentName.hasMoreElements())
                     int Mark = Integer.parseInt((String)enumStudentMark.nextElement());
                     String Name = (String)enumStudentName.nextElement();
                     if (Mark >=75)
                          DisplayResultsTxt.append(Name + " " + Mark + "\n");
    }

  • Adding data to a bar chart "live"

    Is it possible to add data to a series during a presentation so that the bar chart stays on screen but an extra column appears. I don't want to keep fading in and out I want it on screen all the time. I'm trying to do a "live scoreboard" using bars to represent scores. Any ideas? Many thanks....

    Keynote builds what's going to be displayed prior to putting it up onscreen. So, there isn't currently a way to alter any of that information once the presentation starts.

  • Trying to get Pivot table drop down list to affect bar chart below it

    Hi,
    In BI Answers I have a pivot table and a bar chart below it. At run time, I can choose a value from the
    drop down list for the pivot table, but the bar chart below it doesn't react to the new value chosen
    from the pivot table.
    Does anyone know a way to get the bar chart to receive new values, permeating down from a table view
    pivot table above it on the same report (apart from using prompted filters for the whole report).
    Many thanks,
    Jake

    you may want to try this...
    in you bar chart criteria, set prompted filters of all the dimension fields u want from the pivot table.
    in the pivot table, set action links on these dimension columns and loop it back to the current dashboard page.
    now, when u click on a value on the pivot table, the dim values of this will be passed as a parameter to the the bar chart filter set and your bar chart will change accordingly...
    -sharath

  • How to change the bar chart rendering image format in SSRS

    Hello all,
    I am working with SQL Server 2008 R2 and I have a SSRS bar chart report, when the report got rendered over online or if the take Export (PDF and PPT), the image is in png format always, which is taking too much of time to execute the report in case of large
    data.
    Can, It be possible that the rendered image is in jpeg format instead of png.
    If Yes, please share the appropriate steps to follow:
    Thanks in advance
    Pankaj Kumar Yadav-

    Hi Pankaj067,
    According to your description, you want to change the bar chart rendering image format as JPEG format when previewing the report or exporting to a PDF file .
    In Reporting Services, the chart rendering image format is PNG by default. It’s a by-design behavior. And it doesn’t open any API for us to change the image type when exporting a chart to a format. So in your scenario, your requirement can’t be achieved
    in Reporting Services currently. I would recommend you submit a feature request to Microsoft at this site:
    https://connect.microsoft.com/SQLServer. So that we can try to modify and expand the product features based on your needs.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Bar Chart- How to center graph lines

    I am very new to Xcelsuis and am fighting with someing that is easy to most, but driving me crazy.
    I have a Label Bar that poplulates a list box and when I click on an item in the list box the correct information appears on the bar chart.  The problem is that is is all pushed to the bottom of the graph.  I need it to space accordingly in the center of the graph. 
    Please know that I can have anywhere from 1 bar chart line or 40.
    Thanks in advance for your assistance.
    JP

    Hi JP,
    Have you tried the ignore blank cells in series and values options. These are on the behaviour tab.
    Regards
    Alan

  • How to format individual series in stacked bar chart

    Hi,
    Is there any way I can format (sort order, or transperency) of each series individually in a horizontal stacked bar chart?
    I am trying to create a gantt chart, where I am using two series
    1. Start Date
    2. Duration
    The function of series one (Start Date) is only to place the start position of the horizontal bar of series 2 (duration) in the year time frame.
    After creation of the stacked bar chart, I want to make the reansperency of series 1 (start Date) as 0 so that the duration bar apears floating and gives the feel of Gantt chart.
    Thanks
    Aurobindo

    You may wish to see the article <a href="http://www.xcelsiusjournal.com/index.php?option=com_content&task=view&id=45&Itemid=2" target="_blank" title="Constructing a Simplified Gantt Chart in Crystal Xcelsius">Constructing a Simplified Gantt Chart in Crystal Xcelsius</a>. It does require changing the skin to Windows Classic, but that&#39;s a small price to pay for having a gantt-like capability.  <p>Loren Abdulezer/Evolving Technologies Corporation<br /><strong><a href="http://www.XcelsiusBestPractices.com">www.XcelsiusBestPractices.com</a></strong><br /><strong><a href="http://www.XcelsiusJournal.com">www.XcelsiusJournal.com</a></strong> </p>

  • How to make the labels vertical in a horizonal bar chart?

    Hi,
    I am using CF 9.  I have a horizontal bar chart.  How can I make the labels on the Y-Axis display horizontally.  Right now they are vertical and sort of sideways.
    Below is a snipept from my <cfchart>.  Everything is working, I just want the labels to display horizontally.  How can I do this?
    <cfchart
                              format="png"
                              chartheight="310" chartwidth="530" foregroundcolor="##000000"
                              show3d="false"
                              scalefrom="0" scaleto="14"
                              showlegend="no"
                              showxgridlines="yes"
                              showygridlines="no"
                              showborder="no"
                              style="#elementStyle#" >
                              <cfchartseries type="horizontalbar" paintstyle="shade"">
                              </cfchartseries>
    </cfchart>
    Thanks...

    When you open the default New Tab page - about:newtab - which has the Tiles and a Search Bar, the "focus" is in the Search Bar. You could change a hidden setting to have a blank page when you open a new tab if that's what you want - that will have the "focus" in the Location Bar . URL Bar.
    Type '''about:config''' in the URL bar and hit Enter.
    ''Accept the warning''
    Search field at the top to filter with this - '''browser.newtab.url'''
    Right-click the preference that appears below, and select '''Modify'''.
    Insert '''about:blank''' for the new string value.

  • How can I show a 0% range in the data value label on a bar chart thanks?

    How can I show a 0% range in the data value label on a bar chart thanks?

    I'm not sure what the question is. 
    I know that if you have a bar chart and one of the categories (X-axis) has bar (Y value) equal to 0%, no bar is plotted for that category. Even the addition of a stroke (line) around the bars doesn't make one appear for 0%.  The only automatic way I know of to make it look like there is data in that category is to add the value labels to the bars. Inspector/Chart/Series, select one of the bars on the chart, click on "value labels". Another method that is a workaround is to fudge the number a little in your table so that instead of 0% it is a very small %.  This will get you a thin line on the chart.
    But if your question is about the value labels (the numbers that display on or in the bars) and you are not getting one for a bar that is supposed to be 0%, it probably means your table doesn't actually have a 0% in the corresponding cell. A blank cell in the table will not get a value label.

  • How to add a number at the end of a bar chart?

    Hello everyone,
    I am building a series of graphs and bar charts for my thesis.
    I am struggling top fin an option that would allow me to but a "n=number" kind of entry at the end of the chart.
    I did manage to put the percentages in front of every bar, but what I wanted to do is something like this:
    Is this even feasible?
    Thank you everyone for the help!
    Cheers,
    Tiago

    Hello Jerrold
    Thank you very much for the help mate!
    It might take a little longer to edit all the graphs, but it's a start
    Thanks once again!
    Tiago

  • SSRS Bar Chart grouping date series into Months, setting scaler start and end ranges

    I've been trying to solve this issue for a few days now without writing a sql script to create a "blank" for all of missing data points so that I get a bar for each month.  I have date series (by day) data points grouped by two items
    that creates a set of bar charts.  EG:  one chart per product in the tablix detail grouped to site level.
    My issue is I would like the start and end of the charts to be the same for all charts and the only way I get it to work is with a chart that continues to show each date on the chart. 
    EG:
    I have the graph start and end points set and scaling by month as I would like but each bar is a day instead of aggregating to a month level.   My issue I hope to find a workaround for is if I go to Category Groups and define the grouping
    to group with a year and month function the series is no longer treated as date data and I cannot control scaling.  It works fine if all months have activity, but I can't figure out how to always have all charts start at "May 2012" in this example. 
    The only start and end point that I've been able to get to work once doing this are integer based, eg normal start would be 1 for each graph, but 1 doesn't equate to the same month from chart to chart.
    I hope SSRS can provide the solution.  I do know I can write a query that creates a ZERO value for each month/product/site but I don't want to leave the client with a query like that to support.
    -cybertosis

    Hi cybertosis,
    If I understand correctly, you want to display all month category label in the X-Axis. You have configure the Scalar Axis, however, it cannot display the requirement format.
    In your case, if we want the specific data format, we can configure Number property to set the corresponding Category data format. Please refer to the following steps:
    Right click the X-Axis, select Horizontal Axis Properties.
    Click Number in the left pane. Click Date option in the Category dialog box.
    Then, select Jan 2000 option.
    Please refer to the following screenshot below:
    If there are any misunderstanding, please feel free to let me know.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

Maybe you are looking for

  • Erro Código de Imposto Standard C0 - Mensagem FF718

    Pessoal, Boa noite! Gostaria de pedir uma ajuda aos senhores, a respeito de um erro que estou encontrando na parte de contabilização de impostos. Estamos implantando a 6.0 utilizando a TAXBRA, o cenário é simples, material entra com consumo isento (C

  • Splitting digital/analog audio outs?

    I'm wondering if there's a way to split the audio out of an Intel Mac Mini into both analog and digital outputs. I'd like both active at the same time. I've got a Mini in my home theater rack now, which is great. To keep things easy to use for the re

  • Missing Print Progress Bar--bug or feature?

    Since upgrading to Acrobat 8 Professional (v. 8.1.2) on a Mac Intel Quad-core running OS X 10.5.1, there is no progress bar when printing. I only know that printing is done by hovering over the "stoplight" buttons and noticing when they become respon

  • Quicklink for Pages in Standard Roles

    Hi All, I have developed custom top level navigation(with dropdonlist). As per my requirements, I have to use quick links for all pages. So that my custom toplevel navigation only supports for quick link. Now, I want to add  Custom Admin and User Adm

  • Need to get the count based on the column availability

    You get a set of table names from a query, say select table_name from all_tab_columns where column_name like 'DC_I'; TABLE_NAME A B C Now, for the above set of tables (A,B and C), you need to get the count(*) for a single dc_i value (say XXX DC) In s