Simple Bar Chart

Post Author: millerka
CA Forum: Charts and Graphs
I hope someone can help i am trying to create a simple bar chart (well at least it is simple in excel) I have generated averages using formulas for a series of data and these formulas are in my GF1 i simply would like to create a chart of these few values in the report footer - that is it ..but i'm not sure what i should reference in "change of"? i am assuming i need an advance report ? in excel i would  simply refernce these values  and viola!
any help would be greatly appreciated.

Post Author: kushaljn
CA Forum: Charts and Graphs
It should be simple.
Lets say you have X - Axis with values (AA, BB, CC etc). and Y-Axis bars with values (10, 15, 25)
You will have to give onchange of the X-Axis. and in the bottom (Show Values) you will have to chose Y Axis (SUM/Avg/Max) what ever you desire.
If you simply want to show the values without the summary operation, create a Formula field and insert it under Show Values. You will have to check the Don't summarize values.

Similar Messages

  • Create a Simple Bar Chart - Numbers

    I would like to create a bar chart in numbers that totals line items by month and displays a bar chart by month.  Column A has dates associated with the other columns of the spreadsheet running horizontal.  Does the charts functionality have a tool that would count by month, or is there a formula that can be used, or would applescript be needed to run the count?
    hope this makes sense.  Thanks in advance.

    Thanks for the response.  So the simplest view of the chart is below.  I would like to have a bar chart that would just total line events by month.  From the below example, august would have 2 and september would have 1.
    Let me know if you would need more information.
    Date
    Time
    Company
    Job
    8/18/11
    9:00 AM
    Company A
    8/20/11
    9:00 AM
    Company b
    9/20/11
    9:00 AM
    Company c

  • How to change the color (or fill) of a SINGLE bar in a bar chart series

    I've searched the forum and consulted the help system in Keynote '09, and I can't find the answer.
    I have a simple bar chart with 6 bars. I want to select two of the bars and turn them a different color. I only seem to be able to change the color of the series as a whole. I can only select the series as a whole, and I can't Ungroup it or even copy it to the clipboard (it beeps!). I've tried changing the color of the number represented by the bar in the underlying table; can't be done.
    Am I attempting something impossible? If so (grumble grumble), why hasn't Apple made it possible? It seems like an obvious thing to allow.

    It is unfortunately impossible -- the individual bars are not selectable. As a workaround you can a) overlay them with a rectangular object, or b) overlay them with a second chart identical to the first, with all the bars except the two set to zero.

  • Displaying bar chart conditionally in OBIEE answers

    Hello All,
    I've a simple bar chart having one measure in x-axis and two measures in y-axis.
    I want to add a conditional formatting for the two measures scaled in y-axis.
    If first measure is greater than second measure, then i want the first measure to be displayed in red color.
    Please help.
    Thanks in advance!
    Dinesh

    Hi Dinesh,
    Create a dummy column -> fx write a case statement case when first measure > second measure then 1 elso 0 end
    and chart -> Format chart data -> conditional tab -> Add Condition -> select your column on condition (dummy column equal to 1 then red color....)
    hope hepls u....
    Don't forget to assign points and close the thread if your question is answered.........
    Cheers,
    Aravind

  • Creating a bar chart with XY graph

    Hi
    I want to create a simple bar chart in LabVIEW. I have tried this using the VI attached which give me the graph shown in current.bmp. However I want it to look like the image (modified in "paint") shown in requred.bmp.
    Any ideas?
    Thanks
    Scott
    Attachments:
    bar chart.zip ‏22 KB

    Hi Scott,
    fake it by making 2 points instead of one :-)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    current.vi ‏10 KB

  • Simple HTML chart to produce status bar

    I'm trying to simulate a status bar with simple horizontal HTML bar chart. The status bar that I need is simply a background horizontal bar with red color filled with percentage of completion represented as green color on that red bar. I thought of giving 100% for red bar as one parameter and whatever the percentage green bar as another parameters to HTML bar chart to show the status bar, but the horizontal bar takes link, name and count as parameteters. any ideas to produce status bar with simple horizontal HTML bar chart is appreciated.
    thanks,
    Surya

    You should be able to find an answer searching this forum.
    It's been discussed before.
    Here's something similar:
    "VU Meter" display in a report

  • 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");
    }

  • Problem with Bar Chart using Date Data

    I am trying to make a simple horizontal bar chart as a Gantt chart.  I am trying to set the min and max for the X axis but it is acting strangely. As you can see in the screenshot below, I set the min to 1/1/2000 but the chart uses 9/28/2011.  Similar problem with the max setting.  Am I doing something wrong here? Can anyone duplicate this? Anyone have a solution other than this workaround I am now using (which I assume will break my chart once Apple fixes this problem)?

    BadUnit,
    I assume Numbers, like me, is confused why you would set min/max limits that do not include the data?
    I do get the same result as you when I enter the time range for the chart as 1/1/2000 thru 1/1/2004.
    I even tried making a separate table for the chart:
    There is definitley a problem.
    When I enter, what I think are reasonable,  min and max dates for the chart
    min = 1/1/2013
    max = 12/31/2015
    The chart adjusts like this:

  • Stacked bar chart to show vertically

    I want to show stacked bar chart vertically.
    Requirement is
    Mat1 - WIP Qty 14, Inv 20, Finished 22 
    Mat2 - WIP Qty 16, Inv 10, Finished 18  
    We want to display chart where Material will be displayed on Y-axis and diffrent Qty will be shown as one bar for each material stacked like stacked bar starting from left to right.
    We did this using stacked bar but in that case the material will be displayed on X-axis and bar is showing from bottom to top. Is there any way we can rotate this chart by 90 degree?
    Nilesh Modi

    Hi Nilesh,
    I do not believe that there is an out-of-the-box feature that would suffice your needs.
    However, the work-around is relatively simple, although it needs a bit of coding.
    If you are sourcing the image directly, the image could be refreshed using Javascript settimeout function.  If you are sourcing the location of the image from an iCommand, you could use the update event of the applet.
    Besides ... if everything was too easy, there would be no need for you and I
    Cheers,
    Jai.

  • Clickable Bars in a Bar Chart

    I would like some guidance on how to implement a bar chart with clickable bars that would let me highlight the clicked bar and prominently display the X and Y values related to it either somewhere in or overlaying the chart or elsewhere in the
    form.  The chart needs to allow positive and negative bars, ideally with a zero line, but without X or Y labels, grid lines, or other visual elements.  I am using Visual C# 2010 Express to do the programming.
    I have been exploring the Chart class and articles that talk about making it clickable.  However, none seem to address this type of need.  Can I do this using Chart, or is there some other base class with which to do this?  Also, will I need
    to detect the mouse screen location and programmatically map it to a location within the chart to determine which bar was clicked, and then paint the chart myself to highlight the bar, or is there some simpler way to do what I want?
    Thanks for your help.  Steve
    P.S.  This is a Windows Forms app developed with Visual C# 2010 Express if that matters.

    Hi Steve,
    Your question is related to Charts, Here is a forum specially for Charts.
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=MSWinWebChart
    We have helped you move this thread to Charts forum to get supports.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Display ISO week number instead of date on x axis in Bar Chart

    Hi,
    I've created a simple SSRS report based on bar chart that shows several milestones. Everything works fine for me except I’m not able to convert the date into ISO week number format.
    I played around with different approaches. I was able to convert the date into an ISO week Format directly on the SQL Server. That
    wasn't a problem.
    But unfortunately I’m not able to display the week number on the horizontal axis in my Bar Chart. I tried both fields: TaskFinishDate and TaskFinishDateMS...
    I would like to show the ISO week number instead of the date within the Bar Chart on the horizontal axis.
    Any ideas/hints/help is really appreciated!
    Thanks,
    Mike

    Hi Mike,
    Per my understanding that you want to get the week number of the year based on the field "TaskFinishDate" which is datetime type and display the week number in the x-axis instead of the field "TaskFinishDate", right?
    I have check the snapshot you have provided and it seems you have change the format of the datetime field in the x-axis like "dd.MM.YYYY", If you can't make the week number to display correctly in the x-axis, the issue can be caused by you haven't
    change the format to Number in the category.
    Details information below for you reference:
    I assume you have use expression in the Label like below to convert the datatime TaskFinishDate in to ISO week number like below:
    =DatePart(DateInterval.WeekOfYear,Fields!TaskFinishDate.Value)
    or
    =DatePart("ww",Fields!TaskFinishDate.Value)
    Right click the X-axis and select the "Horizontal Axis Properties", then click the Number to change the format to "Number" as below:
    Preview you will get the weeknumber display in the x-axis correctly.
    If you still have any problem, please feel to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • IPad not rendering WebI bar chart very well

    dear all, I have a simple webi document with a bar chart.
    in the webi, my Category Axis is "month", my Value Axis is "Sales", and region Color is "Company".
    in the webi it all looks good, but the iPad representation has a problem displaying the Companies.
    on the iPad along where the month goes (along the x axis), the companies are all grouped together, then i get each month.
    here's and example of what i mean for the month of 1/2001 and 2/2001. the letters a,b, and c, are indicative of the three companies, and the nnumbers are the sales bar colours, 1 is red, for company a, 2 is blue, for company b, and 3 is yellow, for company c, let's say.
    on the webI, each month would look similar to this
    1                         
    1 2                       1
    1 2 3                     1 2
    1 2 3                     1 2 3
    1/2001                    2/2001 (x axis)
    on the iPad, the company is displayed, on the x axis, unlike the Webi document, where the month should is, then above the company you have each months measures, in the example below you can see that the months are grouped with the company
    1
    1 1   2      
    1 1   2 2   3
    1 1   2 2   3 3
    a a   b b   c c  (x axis)
    so you see, from this, i  would get, working from left to right, company 1, month 1, 2, ...., then company b, month 1, 2, ..., then finally company c, month 1, 2, ... and so on.
    this example is rather difficult to see here, but i hope someone has encountered this problem and can advise.
    i can send screen shots so anyone, which may help.
    thanks
    g

    Hi Glen,
    not sure if i got the Example completely right - you're using the SAP BI Mobile App?
    However, according to the recent "Mobile Release Notes 4.0.1", Column Charts with multiple Dimensions are not supported yet.
    In General, the capabilities of the App are still relatively small. I Would recommend you the above mentioned Document, which contains a complete list of limitations.
    Regards,
    Bodo

  • Horizontal Cluster bar chart

    I am tasked by my PHB to produce a horizontally-stacked bar chart, the horizontal axis is for simple numbers of events, the bars are types of events. It should also have a negative 'reflection' (see drawing below) There is no Z axis. I have successfully generated this as a vertical stacked bar chart (very simple) and I think a simple rotate 90 degrees right would do it, but I can't find one.
    It should look like this, ignoring the dashes:
    ######## ######## Event 1, Value 8
    ----###### ###### Event 2, Value 6, etc
    Any ideas or workarounds welcome!
    Keith Templeman
    EDIT Post to refer to a horizontal cluster bar chart which is what I really want
    Edited by: mansfields on Dec 3, 2008 2:44 PM

    The horizontal equivalent of the vertical stacked bar would be a horizontal stacked bar, which is there on the menu for me to see. As said in my previous post 'what I am after is the horizontal equivalent of the vertical cluster bar'
    To repeat what my requirement is, I have a group of sales people who have five measures each against them, and I can already graph them thus:
    6 5 4 3 3
    but I want to graph them this way, like 90 degrees rotated to the right:
    6 ######
    5 #####
    4 ####
    3 ###
    3 ###
    I think this would be called a horizontal cluster chart, and there is no option on the list that is called that.
    Hope this makes it clearer, and thank you very much for your time and effort so far.
    keith
    EDIT
    From the online books section - "you can only display clustered bar charts in vertical format". That sorts that out then.
    Edited by: user10677133 on Dec 3, 2008 5:16 PM

  • Simple Bar Graph

    What I'm trying to do is make a simple bar graph, with multiple bars of different colors and do this using an array. I create a new bar, set its size and color, and then create another bar, set its size, color and i've also moved it over 10 pixels so its not ontop of the original bar. And I'm using an array for the ractangle shap, and fillrect to fill it.
    My problem comes when I add the object to the pane ( frame.getContentPane().add(blue); )
    It only adds the last one, it doesn't add the blue bar. does getContentPane repaint the screen or something, so that the previous one doesn't show? Or am I missing something?
    Thanks for any input,
    Bar Class
    import javax.swing.JPanel;
    import java.awt.*;
    public class Bar extends JPanel
       private int[] xBar = {25, 25, 30, 30};
       private int[] yBar = {350, 100, 100, 350};
         private Color fillColor;
       public Bar()
          setBackground(Color.black);
         public void setSize(int height)
              yBar[1] = height * 10;
              yBar[2] = height * 10;     
         public void changeColor(Color colour)
              fillColor = colour;
         public void moveOver(){
              for(int i = 0; i < xBar.length;i++)
                   xBar= xBar[i] + 10;
         // Draws the bar
    public void paintComponent(Graphics gc)
    super.paintComponent(gc);
    gc.setColor(fillColor);
    gc.fillPolygon(xBar, yBar, xBar.length); // draw bar
    BarChart classimport javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.*;
    public class BarChart
    // Creates the main frame of the program.
    public static void main(String[] args)
    JFrame frame = new JFrame("Bar Chart");
              Bar red = new Bar();
              Bar blue = new Bar();
              red.setSize(9);
              red.changeColor(Color.RED);
              blue.moveOver();
              blue.setSize(5);
              blue.changeColor(Color.BLUE);
    frame.getContentPane().add(blue);
    frame.getContentPane().add(red);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
              frame.setSize(400,400);

    Ok, I've recreated the whole thing. And it seems to work well, my only problem now is that the graph seems to move on the x-coordinate randomly each time I recompile and run it. Any idea's on why it may do this? I had a friend look at it, and he said it seems to be calling the draw method multiple times, but I cant figure out how, or why it would even do that. So my question is, why is the graph shifting across the screen each time I compile it and run it?
    import javax.swing.JFrame;
    import java.io.*;
    public class BarGraphDriver
         public static void main(String[] args)
              int[] input = {5, 60, 20, 100};//Set height of each bar in the graph (number between 0 and 10
              JFrame frame = new JFrame("Bar Graph");
              BarPanel panel = new BarPanel(input);
          frame.getContentPane().add(panel);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setVisible(true);     
              frame.setSize(600, 450);
    import javax.swing.JPanel;
    import java.awt.*;
    public class BarPanel extends JPanel
         Bar graph;
       //  Sets up the panel characteristics.
       public BarPanel(int[] values)
              JPanel panel = new JPanel();
              panel.setLayout(null);     
              graph = new Bar(values);     
          setBackground(Color.black);
       //  Draws the bar
         public void paintComponent(Graphics gc)
          super.paintComponent(gc);
              graph.draw(gc);
    import javax.swing.JPanel;
    import java.awt.*;
    public class Bar extends JPanel
       private int[] xBar = {10, 10, 60, 60};
       private int[] yBar = {300, 100, 100, 300};
         private int data[];
         private int origData[];
       public Bar( int initVal[] )
              data = new int[initVal.length];
              origData = new int[initVal.length];
              for(int i=0; i<initVal.length; i++)
                   origData[i] = initVal;          
                   data[i] = Math.abs(initVal[i] - 300);
    public void draw(Graphics gc)
              gc.setColor(Color.RED);
              gc.drawLine(10, 301, 600, 301);//horizontal redline
              gc.drawLine(10, 301, 10, 10);//vertical redline
              for(int h = 0; h<data.length; h++)
                   gc.setColor(Color.GRAY);
                   gc.drawLine(10, data[h] + 1, 600, data[h] + 1);//horizontal redline
              for (int i=0; i<data.length; i++) //countes each bar
                   for (int j=0; j<xBar.length; j++)
                        xBar[j] = xBar[j] + 60;          
                   if (data[i] >= 1 || data[i] < yBar.length)
                        for(int k = 1; k < 3; k++){
                             yBar[k] = data[i];
                   gc.setColor(Color.BLUE);
              gc.fillPolygon(xBar, yBar, yBar.length); // draw bar
                   int xText = xBar[0];
                   int yText = data[i] - 10;               
                   gc.setColor(Color.WHITE);
                   gc.drawString(" " + origData[i], xText, yText);     
    Edited by: mark2685 on Oct 31, 2008 12:10 PM
    Edited by: mark2685 on Oct 31, 2008 12:14 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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?

Maybe you are looking for