I want to display some stats using a pie chart in jsp/java plz  guide me

i am working on struts framework .the view is in jsp and coding in java.
i have value in the database and have to display them using a pie chart.
Edited by: kapil_scwcd on Jan 10, 2010 8:10 PM

You can use JFreeChart which is a free and good tool to generate graphs in Java. It has samples and other guides which you can use to get started...

Similar Messages

  • I want to display some fields using the BDC and i want to know thruogh whic

    I want to display some fields using the BDC and i want to know thruogh which transaction these fields are displayed.Could you please help me out.

    You can use JFreeChart which is a free and good tool to generate graphs in Java. It has samples and other guides which you can use to get started...

  • Have no records I want to display some custom text in Red color in Advaced

    Hi All
    When I instantiate a query, if I have no records I want to display some custom text in Red color in Advanced Table instead of the standard No results found.
    i.e. something like, 'click on Add Records'
    Any ideas pls..

    Did u tried as Ravans suggested.
    Put the indicators outside of the case structures.  Wire across the borders of the case structure.  It creates "tunnels".
     I am not getting
    but it displays both result at a time. but i want
    to display the instruction first, to the user, so that they act
    according to the instruction and ,than i want to display the result.  
     Try this VI.
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    string display-1.vi ‏22 KB

  • Help!! how to use ms office chart in jsp

    I want to use ms office chart in jsp for getting real time statistical chart.
    but I don't know how to satart.
    give me an example please,(including the code is better)
    thanks

    Do you need MS Office? Try Cewolf, a tag library for JFreeChart:
    http://cewolf.sourceforge.net/
    Regards,
    Dave Gilbert
    JFreeChart Project Leader

  • How can I display some OrdImages using a Applet in html or Jsp?

    hi
    I want to use a applet to display some images retrieved from intermedia OrdImage Object.
    Now ,I know that a applet can display some image objects or some images with their own filepaths. But we can get ordimag objects from Oracle database.And we can image data or image properties by ordimage java mathod. It is in html/Jsp environment. So how can I transform from ordimage to applet?? I appreciate someone who can help me!
    Bill

    Do you mean applet or Servlet?
    An Applet is java code that is downloaded over the web and runs in a web browser environment. Is this what you are doing?
    I suspect you are really talking about servlet/JSP environments, and the ability to include images from the database in a web page.
    In either case (applet or servlet), you want to be able to access images via a URL. For a Servlet/JSP/web page, this URL will be specified in a HTML <IMG> tag with a key as a parameter to the image you wish to view. Images are not in-line downloaded in a web page. They are access after the HTML is loaded, and are accessed with URLs, sometimes relative URLs rather than fully specified URLs.
    To deliver images to the web from the database using the PL/SQL gateway and iAS, where the procedures are generated by a wizard, see:
    http://otn.oracle.com/software/products/intermedia/htdocs/descriptions/imedia_code_wizard.html
    You can create a simple servlet (JSPs can not deliver binary data) that delivers database images using java classes. See:
    http://otn.oracle.com/software/products/intermedia/htdocs/descriptions/servlets_jsp.html
    http://otn.oracle.com/sample_code/products/intermedia/htdocs/intermedia_servlet_jsp_samples/imedia_servlet_jsp_readme.htm
    for a sample.

  • Displaying specified colors on the pie chart rather than default colors

    Any ideas on how I can display my own colors on the pie charts rather than displaying default colors?

    Hi,
    You can specify your own colours by changing the default CSS styles.
    Go to the Chart Attributes for the pie chart, and in the CSS section select Yes in the "Use Custom CSS" option. You can now edit the CSS for the chart.
    At the bottom of the "Custom CSS, inline" setting, you need to add in two lines for each possible segment of the chart. Something like:
    rect.data1{stroke:#FFFFFF;stroke-width:0.5;fill:green;}
    path.data1{stroke:#FFFFFF;stroke-width:0.5;fill:green;}
    rect.data2{stroke:#FFFFFF;stroke-width:0.5;fill:yellow;}
    path.data2{stroke:#FFFFFF;stroke-width:0.5;fill:yellow;}
    rect.data3{stroke:#FFFFFF;stroke-width:0.5;fill:red;}
    path.data3{stroke:#FFFFFF;stroke-width:0.5;fill:red;}
    This will set the colours of the first three segments to green, yellow and red respectively. Add in more rect.datan and path.datan entries until you have accounted for the maximum number of segments that your chart may contain.
    Regards
    Andy

  • How to change the area of cells used as pie chart legend?

    In Numbers '13 I cannot drag the legend area separately (as I could do in Number '09). The same on iPad.
    Did I miss something?

    re:  ChartLegend
    The line "chtChart.SeriesCollection.NewSeries" does nothing.
    After legend entries have been deleted, the only way to restore them is to remove and recreate the legend that contained them by setting the HasLegend property for the chart to False and then back to True...
      chtChart.HasLegend = False
      chtChart.HasLegend = True
    (the font in the new legend may need adusting)
    It has been a very long time since I have created charts with VBA.
    My Excel help file says to change the values used by a Chart Series you have to specify a range or provide an array of values (not both)
    So this seems to work...
    Dim X as Variant
    X = chtChart.SeriesCollection(3).Values
    chtChart.SeriesCollection(1).Values = X
    Jim Cone
    Portland, Oregon USA
    free & commercial excel programs (n/a xl2013)
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • I want to display output by using shift with a single variable?

    hi,
    i am shabeer ahmed abap fresher i want
    ex:-
       data: st1 value 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'.
       do 27 times.
       split st1 at  ','  into sy-index.
       write:/ sy-index.
       enddo. 
    i want output like: a
                               b
                               c
                               z.
    then the above code will not becoz sy-index  in int type. but i want output like as displayed as above. what can i do plz  suggest.

    hi,
    shabeer ahmed
    Try this code, it will work and gives u solution
    data : Begin of itab occurs 0,
              char(10) type c.
    data : string type string.
    data : st1 type strng.
    st1 =  'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'.
    move st1 to string.
    split string at ',' into table itab.
    loop at itab.
    write :/ itab-char.
    endloop.
    with regards
    Kiran.G

  • I want to display static data in table in web dynpro for java

    Hi,
    I have to display static (textview )data in table . So what im doing is that i have created a node of name "table" then created its attribues and binded it to the table and in table, under "column editor" option of "text"  is there where i can write the required text . But Im not able to do the same thing in other rows. i.e. im restricted to only 1st row. How to enter it in other rows. So i want that i should write some content in all the rows of table and display it in text view when i execute it. Its just like u r presenting an excel sheet in output form to the user .
    Thanks

    Hi
    for( int i = 0 ; i <= 5 ; i++) {
    IPrivateTestView.ITableElement element = wdContext.nodeTable().createTableElement();
    element.set<TextViewatrribute>("TEXT");
    wdContext.nodeTable().addElement(element);
      error is on 3rd line of code in "element.set "  .The error is   " invalid expression as statement"
    Thanks

  • To display Pie chart in JSP

    Hi Guys..
    I want to to have a output from jsp page in the form of Piechart. What all should I use??
    Regards,
    Nachiket

    You can use JFreeChart which is a free and good tool to generate graphs in Java. It has samples and other guides which you can use to get started...

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • How to use ShowValue within a UIX/JSP page to display an active link?

    I am storing URL's in the DB and want to display them as active links on a UIX/JSP page. I thought that I had this working some time ago, but now it no longer works.
    Using <bc4juix:RenderValue datasource="ds1" dataitem="myTextField" /> will display "http://www.otn.oracle.com" as an inactive link using UIX/XML which is expected.
    Using <jbo:ShowValue datasource="ds1" dataitem="myTextField" /> will display an active link using if using BC4J/JSP, which is expected.
    However, I have not been able to do this using a UIX/JSP page.
    Is it possible to use ShowValue within a UIX/JSP page to display an active link?
    Thanks,
    Bill G

    Hi Juan,
    I've done the following and it does not work for me;
    --- snip ---
    <uix:form name="form1" method="GET">
    <bc4juix:Table datasource="ds1" >
    <uix:columnHeaderStamp>
    <uix:styledText textBinding="LABEL"/>
    </uix:columnHeaderStamp>
    <%--
    <jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
    <bc4juix:RenderValue datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
    </jbo:AttributeIterate>
    --%>
    <bc4juix:RenderValue datasource="ds1" dataitem="FacilityDesc" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationId" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationDesc" />
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
    </uix:rawText>
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:contents>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
    </uix:rawText>
    </uix:contents>
    --- snip ---
    Bill G...

  • Want to display space in selection screen

    hi,
    I want to display some space between one select-option and ane checkbox.
    my coding is like
    SELECT-OPTIONS:
      s_vstel FOR vekp-vstel.
    PARAMETERS:
                p_dimen AS CHECKBOX DEFAULT ' '.
    any pointer.

    Hi,
    Use the
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
    Selection-Screen : Begin of Line.
      SELECT-OPTIONS:
    s_vstel FOR vekp-vstel.
    SELECTION-SCREEN: Skip.
    PARAMETERS:
    p_dimen AS CHECKBOX DEFAULT ' '.
    Selection-Screen : End of Line.
    SELECTION-SCREEN END OF BLOCK b1.
    Edited by: avinash kodarapu on Nov 20, 2008 3:17 PM

  • To bold a Statement using Write Option

    Hi,
    Hi I have a simple requirement i want to bold a statement using Write Statement in a simple report.
    Hope this describes the problem.
    Thanks
    Sandipan

    Hi,
    REPORT demo_list_format_color_1.
    DATA i TYPE i VALUE 0.
    DATA col(15) TYPE c.
    WHILE i < 8.
      CASE i.
        WHEN 0. col = 'COL_BACKGROUND '.
        WHEN 1. col = 'COL_HEADING    '.
        WHEN 2. col = 'COL_NORMAL     '.
        WHEN 3. col = 'COL_TOTAL      '.
        WHEN 4. col = 'COL_KEY        '.
        WHEN 5. col = 'COL_POSITIVE   '.
        WHEN 6. col = 'COL_NEGATIVE   '.
        WHEN 7. col = 'COL_GROUP      '.
    ENDCASE.
      FORMAT INTENSIFIED COLOR = i.
      WRITE: /(4) i, AT 7            sy-vline,
                col,                 sy-vline,
                col INTENSIFIED OFF, sy-vline,
                col INVERSE.
      i = i + 1.
    ENDWHILE.

  • Want to display a result set of 100 records

    I have queried from the databse and got a result set of say more than 100 records on a JSP page.Basically as the records are many I want to display 10 records at a time on the JSP page. Please suggest me how I can do it so that i need not query again and again to the database. May be I can have a "Next" button/link which shows the next 10 records on the same JSP page.. or a sequence of numbered links ( say if i have 150 records, 10records at a time I will have 15 numbered links) so that if i click on that number link i will be shown that coressponding records
    How can I acheive this. Is there anything possible with Javascript?
    PLease do advice me as I am new to HTML/Javascripting and JSP.
    Any information will be greatly appreciated.

    Take a peek at a tag based solution :
    http://www.dotjonline.com/taglib/grid.jsp
    Good luck.

Maybe you are looking for