Crating bar graphs and pie charts

hi every body
in my application there is a need of bar graphs and pie charts can any body help me how to draw them

try http://www.jfree.org/jfreechart/

Similar Messages

  • Copying Graphs and Pie Charts generated in Analysis View to Email item using Excel VBA Macro Code

    Hi
    I am currently working on an exce VBA macro code that would help me take snapshots of the Graphs and Pie charts generated in QC for a particular application and copy the same to an email item using excel VBA macro code.
    I was able to write the code to create an email item. But I have no clue of how i can take snapshot of the graphs in Analysis View using excel VBA
    Any help would be highly appreciated.
    Thanks in Advance
    Regards
    Amit

    useramit,
    You are in the consumer end products forum.  You will also want to ask your question over at the Enterprise Business Community.
    Click the plus sign (+) next to Discussion Boards to drop down all the options for servers, networking and any other professionally related problems.
    http://h30499.www3.hp.com/

  • Bar and Pie chart  display with values

    Hi All...
    I want implement the my swing application Bar and Pie chart functionality with vales, If both are disply same veues.
    Thanx to Advance
    Arjun

    www.jfree.org

  • Plot line, bar and pie chart

    Anyone can let me know where can i learn or tutorial on how to plot line, bar and pie chart by using java2D... (no third-party software)....
    thanks in advance.

    Here's a pie chart app I made for an earlier question:
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class PieChart {
      public static void main(String[] args) {
        int[] data = {
          18, 95, 102, 87
        PieCharter pie = new PieCharter();
        pie.enterData(data);
        JFrame f = new JFrame("Pie Chart");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(pie);
        f.setSize(400,300);
        f.setLocation(300,300);
        f.setVisible(true);
    class PieCharter extends JPanel {
      int[] data, percents;
      int dataTotal;
      final int
        PAD = 25,
        R_PAD = 5;
      public PieCharter() {
        setBackground(Color.white);
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        Font font = new Font("lucida sans unicode", Font.PLAIN, 16);
        g2.setFont(font);
        FontRenderContext frc = g2.getFontRenderContext();
        int width = getWidth();
        int height = getHeight();
        int cx = width/2;
        int cy = height/2;
        int dia = (int)Math.min(width, height) - 2*PAD;
        g2.draw(new Ellipse2D.Double((width - dia)/2, (height - dia)/2, dia, dia));
        // draw zero datum
        double radians = 0;
        int x = cx + (int)((dia/2) * Math.cos(radians));
        int y = cy - (int)((dia/2) * Math.sin(radians));
        g2.draw(new Line2D.Double(cx, cy, x, y));
        String s;
        int dataWidth, dataHeight, deltaR, rXInc, rYInc;
        for(int i = 0; i < data.length; i++) {
          radians += 2*Math.PI * data/dataTotal;
    x = cx + (int)((dia/2) * Math.cos(radians));
    y = cy - (int)((dia/2) * Math.sin(radians));
    g2.draw(new Line2D.Double(cx, cy, x, y));
    s = String.valueOf(percents[i]) + "%";
    dataWidth = (int)font.getStringBounds(s, frc).getWidth();
    dataHeight = (int)font.getLineMetrics(s, frc).getAscent();
    deltaR = (int)Math.sqrt(dataWidth*dataWidth + dataHeight*dataHeight)/2 + R_PAD;
    rXInc = (int)(deltaR * Math.cos(radians));
    rYInc = (int)(deltaR * Math.sin(radians));
    x += rXInc;
    y -= rYInc;
    x -= dataWidth/2;
    y += dataHeight/2;
    g2.drawString(s, x, y);
    s = String.valueOf(data[i]);
    dataWidth = (int)font.getStringBounds(s, frc).getWidth();
    dataHeight = (int)font.getLineMetrics(s, frc).getAscent();
    x = cx + (int)((dia/4) * Math.cos(radians - 2*Math.PI * data[i]/(2*dataTotal)));
    y = cy - (int)((dia/4) * Math.sin(radians - 2*Math.PI * data[i]/(2*dataTotal)));
    x -= dataWidth/2;
    y += dataHeight/2;
    g2.drawString(s, x, y);
    private void prepareData() {
    for(int i = 0; i < data.length; i++)
    dataTotal += data[i];
    percents = new int[data.length];
    int dataPlus = 0;
    for(int i = 0; i < data.length; i++) {
    dataPlus += data[i];
    percents[i] = Math.round(100 * dataPlus/dataTotal);
    public void enterData(int[] data) {
    this.data = data;
    prepareData();
    repaint();

  • Bar Chart and Pie Chart

    Hi!
    In My application i want to create few bar and pie chart.
    If is there any code for generating bar and pie chart,
    pl send me.
    If third party software is available tell me the details of it.

    Sure, this functionality would be nice to have right
    out of the box, but when you think about it: should
    Sun be distributing a reporting SDK and promoting bad
    practices anyhow? Implementing your reporting in
    disparate and distributed manners is just plain messy
    and definitely translates to a bad practice. Turning
    to a centralized reporting mechanism, driven by a
    reporting server that can handle the needs for 80% of
    your requirements is a helluva lot more thoughtful and
    mindful than implementing separate mini reporting
    engines encapsulated within each and every application
    that you deploy.Elegantly stated! On a practical point, my company built an Enterprised based reporting solution on top of Java technology within the windows environment (please be kind). Specifically we used Java, ASP and Javascript (no VBScript), and delivered the information using the Microsoft IE 4 and 5.
    However, since Microsoft chose to elminate Java from it's current browser (IE6), we have to throw two years of coding away. We are now in the process of moving backward (technically speaking) to a desktop reporting model using Java (no browser technology) that accesses an Enterprise database, or embedded Java database. None of our customers are using Netscape, so that was never an option. Microsoft's and Sun's inablity to cooperate almost decimated our company's product line (and it still may).
    So I agree with you that an Enterprise server based reporting solution is the best architecture, and yet here I am running away from it after a two year struggle with competing standards. Sometimes the best solution loses for reasons that are simply not technical in nature.

  • Bar chart and pie chart in same screen at a time

    hi experts,
    I am trying to display the bar chart and pie chart in two separate containers in same screen .I wrote code for this in PBO of screen by using the function module  GFW_PRES_SHOW , but it is showing one chart at a time which is lastly executed in the PBO.
    I need to display two charts in two container at a time by calling the same function modules two times first time for bar chart second time for pie chart by changing the  parameter 
    presentation_type      = 1 for bar chart
    presentation_type      = 31 for pie chart.
    please help me in this regard asap.
    Thanks,
    K.Rajesh.

    Hi..
    Instead of using the FMs .. you should use the Object oriented approach for the same.
    Brief steps:
    You should have 2 control areas and 2 containers.
    Define different instances of 2 controls and attach them to the 2 containers.
    Call individual methods to display the controls in PBO.
    This should show both at a time. It is really simple.
    As an example you can go to SE38. From the (sap) menu go to Environment -> Examples -> Control Examples.
    Here you will see lot of examples.
    Regards,
    Varun.

  • Today (6/1) the "My Usage" shows .7GB used (about 1/4 of my 3GB shaded in the bar-graph), and the solid-green in the bar graph representing only 1 day in the billing cycle.

    Today (6/1) the "My Usage" shows .7GB used (about 1/4 of my 3GB shaded in the bar-graph), and the solid-green in the bar graph representing only 1 day in the billing cycle. I'm trying to make sense of it.  My may statement shows 1.7GB - I think that's the period just ended.... and I can't imagine I've used 1/4 of my data already today before noon?  I'm guessing the 'My Usage" screens are not quite coordinated with the billing cycle - anyone else have ideas?

    ... guess the reply via email method doesn't quite work - I'll re-post here via website
    jejm1975
    Thanks for your message, but I don't believe it applies to the situation I described.
    What is described in my post is information from the Verizon website - My Verizon / View Usage. 
    It is not from my phone (which is not a Galaxy,btw)

  • ActiveX and pie chart problem

    I am trying to create a bar of pie chart in Excel 2003. I am able to insert my data and create the chart, but I need to set the "SplitValue" to 6. I was able to find the property for doing this but I get an error when I run the vi (see attached).  Any thoughts?
    Solved!
    Go to Solution.
    Attachments:
    ActiveX Error.PNG ‏45 KB

    I think your problem is that you don't have "Index" wired for the ChartGroups property. Thus, it may be returning a collection of chart groups, but you are typecasting it to a single chart group.

  • ITS and Pie Charts

    We need to display charts (bar and pie) in a Web report/application running on SAP 4.6 and ITS (no WebAS, no BSP, no Portal). We need those charts to be real-time (not saved as a static image). The charts are user-specific. How would you do it?
    I have few ideas:
    1. Build bar charts with HTML tables or image blocks. No pie charts are possible.
    2. Generate PDFs using Sapscript/Smartforms and call PDF from the Web page. Questions: Can you have charts in this solution? Can you generate those PDFs on the fly?
    3. Use Adobe SVG for client side charts (SVG viewer is required)
    4. Use ActiveX or Java Applets
    Thank you for advice.

    Kai,
    It's a great suggestion to use IGS. But I am still not sure how this would work. Yes, I can use classes in the ABAP dialog program to call IGS. But how do I pass the images to ITS?
    I see few possible scenarios. Am I close?
    1. Responding to a call from ABAP, IGS is generating a GIF image and saves it in a location accessible from the Web (e.g. ITS WGate or IGS server). IGS is returning a reference for the image name/location to the ABAP dialog program. The reference is passed to ITS HTML template.
    2. Responding to a call from ABAP, IGS is returning a bitstream of the image back to the calling program. There should be a way to save it as GIF in ABAP and post the GIF image to WGate as a MIME object. Also, if I can save it a GIF in SAP, I can alternatively build a smartform that would use that newly generated GIF and convert the document into a PDF an then display the PDF with a text and charts on the Web.
    3. You call IGS directly from ITS, not the ABAP. You pass parameters to IGS telling what chart do you need and what data to use. IGS returns a GIF image back to ITS.
    Can please provide some clarity here.
    Thank you,
    Andre Polakoff

  • Table sorter and pie chart in sapui5

    Hi ,
       I have one combobox and table(i have table columns city , state, country, zone).... on change of combobox value(combobox values are city , state...) i want to sort table and display pie chart according to  sorted table values.
    Can anyone help me on this....
    Regards,
    Sathish.

    Hi Sathish,
    You can refer below link, it will help you to build your own custom solution. It has everything you need.
    Custom sorter and filter in SAPUI5 Table
    Regards,
    Shankar

  • SMART FORM AND PIE CHART

    thanks for ur reply ,
    my req. to get a picture of pie chart in Smart Form .
    am doing
    1) write a pie chat program using the dynamic data .
    2) convert into bmp and upload into se78
    3) read the pic in smart form .
    is there any other better way
    can u mention the class n method
    its urgent
      Am getting short dump  
    DATA : D TYPE GFW_EXP_DATA,
                 R TYPE SYMSGNO.
          DATA: S TYPE STRING,
          N TYPE I, gp_inst type ref to cl_gui_gp_pres.
             CALL METHOD GP_INST->IF_GRAPHIC_PROXY~EXPORT
                            EXPORTING
                              FORMAT         =
    IF_GRAPHIC_PROXY=>co_format_bmp
                              WIDTH          = 50
                              HEIGHT         = 200
                             NAME           =
                            IMPORTING
                              CONTENT_TYPE   = S
                              CONTENT_LENGTH = N
                               CONTENT        = D
                               RETVAL         = R
    A RAISE statement in the program "SAPLCNDP " raised the exception
    condition "DP_ERROR_GET_DATA".                                  
    Since the exception was not intercepted by a superior program   
    in the hierarchy, processing was terminated.                    
    cheers
    senthil

    Hi Kai,
    Thanks a lot for your reply. The note 584593 has already been implemented.
    Program is calling the following statement.
    elseif format = if_graphic_proxy=>co_format_bmp. 
       call method adapt_classref->call_method        
         exporting method  = 'SaveImage'              
                   p1      =  1 " save as bmp         
                   p2      = name                     
                   p_count = 2.                       
    endif.                                           
    But it's not creating the file.
    I would really appreciate your help. Let me know if you have any suggestions.
    Thanks.
    B. Shah

  • SVG and pie charts

    Can anyone please give me the code for creating pie charts in svg from xml.
    Thanks

    Search this forum about "SVG" and you will find, amongst other SVG topics, the following link: http://technet.oracle.com:89/ubb/Forum11/HTML/003993.html
    succes

  • Drilldown bar and pie charts

    I am looking for charts with drilldown feature. I need to drilldown to another chart or a report.
    can you please point me to any articles doing this from scratch? I looked the sample packaged application with charts but it does not have drilldown links,.

    For all charts, the first column "link" is what you're interested in
    The syntax for the select statement of a chart is:
    SELECT link, label, value FROM   ...
    Where:
    link is a URL. This URL will be called if the user clicks on the that point on the resulting chart.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e11945/bar_chart.htm#BEHGDBBE
    unfortunately no examples here, but check inline help for expected SQL in charts. Just define a URL for your drill down destination.

  • Bar diagram or pie chart or other to the formular output

    Hello,
    i look for a possibility to get a diagram to the formular output (print forms - Transaction sfp).
    In the lifecycle i didn't found something.
    But perhaps i could create the table data with 'BusinessGraphics' in a diagram and save (after converting) the file and bind the file at the lifecycle in a picture-field as a graphic.
    Have someone experiance with creating a diagram?
    Does it generally possible?
    Thanks very much for an answer!!
    We use IS-UT, Release 604, Level 9.
    Java is installed.
    Marion Tötemeyer

    Hi Austin,
    Thanks for the reply i tried it with the first series query(Since i need the first bar only from one table)--3d stacked
    SELECT null link,
    *'NEW' label,*
    count() value*
    FROM yy_laptop_request
    WHERE status = 'NEW'
    UNION ALL
    SELECT null link,
    *'APPROVED' label,*
    count() value*
    FROM yy_laptop_request
    WHERE status = 'APPROVED'
    UNION ALL
    SELECT null link,
    *'REJECTED' label,*
    count() value*
    FROM yy_laptop_request
    WHERE status = 'REJECTED'
    UNION ALL
    SELECT null link,
    *'NEED FOR INFORMATION' label,*
    count() value*
    FROM yy_laptop_request
    WHERE status = 'NEED FOR INFORMATION'
    It is showing like with different labels like 'new','approved','need for information','rejected' and it is showing the separate bars for each status with label and also with its count.
    Since i need in the manner like.
    First series bar would be in a four different colors and it should be from a single table only.
    In which each color represents different status with their count from a single table only.
    I need the first series bar only from a single table.
    and second series bar from a another table, third series bar from the other table so on.
    How i can able to achieve it.
    Since you told about 'first series', 'second series' like wise.
    The 'first series' codings i will put under the sql section, but where i would include the 'second series' coding.
    With in that sql i need to add or some where else.
    Regards,
    Mini

  • Working with bar graphs, pie graphs, etc.

    I'm working with somone who likes to create pie graphs, bar graphs and other charts. This guy is not a designer and is using Microsoft applications like Excel and PowerPoint to create these charts. My job is to bring these charts over to an ID document I'm working on. The black and white ones are no problem: I can convert them to a PDF, open them up in Photshop, and rasterize them. The color ones are screwed up. We are printing only black and one spot color, and Excel is apparently programmed to save color charts as RGB or CMYK. So my basic question is: what do you do for graphs? Is there a good application for making graphs that are design quality that knows how to do spot color? Or is it best to lay out graphs manually ID, by drawing lines, shapes and bars and coloring in the spot colors myself? Thanks.

    Illustrator.
    You should be able to bring your Excel or PowerPoint graphs into Illustrator as easily as into Photoshop.

Maybe you are looking for

  • How do I follow up on my case?

    I need to follow up on my case with an advisor but there is no option to. I know it's after hours right now, but where can I find the option to do so?

  • Why u  use logical databases

    how u used logical database?how is data transferrd to program?corresponding statement in LDB?

  • Multiple clients in DEV and QA for CHARM setup

    Blog /people/dolores.correa/blog/2008/07/26/first-steps-to-work-with-change-request-management-scenario is an excellence introduction to CHARM setup. However in real world, we have multiple clients on DEV and QAS systems. Could you help explain how t

  • After Effects, Final Cut Pro HD, and QuickTime 7

    Hello friends, I just wanted to point out a problem I have experienced with QuickTime 7 when using After Effects and Final Cut Pro HD. If this has already been covered by someone else on the forum, please forgive my unnecessary post. I am used to wor

  • HOW TO INSTALL A HP STORAGEWORKS 1/8 G2 TAPE AUTOLOADER ULTRIUM 920.

    I HAVE A SUN FIRE V250 MACHINE WITH SOLARIS 8 AND I JUST BOUGHT A HP STORAGEWORKS 1/8 TAPE AUTOLOADER ULTRIUM 920 DEVICE (SCSI). THE SUN FIRE V250 HAS A QLOGIC: QLQ10162, I INSTALLED THE CARD DRIVER AND THE OPERATING SYSTEM CAN SEE THE TAPE DEVICE CO