Applet graphics question(bar chart)

im fairly new to applets and im coding one in awt that has a scrollbar that changes the height of barchart....i tried using fillRect() but when i set the height as my scrollbar value it fills down instead of up....i want to keep it as simple as possible....is there a object that will fill up when the height is set to a variable?..

The fillRect parameters
1. ---->
2.      |
        |
        |
        V
3.      ---->
4.           |
             |
             |
             V1 and 3 will therefore be constant
4. will be the height of your value eg: bananas = 60
g.fillRect(int,int,int,60)
2. So, this is the vertical height of you graph display area eg = 100 - (100 - 60) ... =40
Its a fairly straightforward algorithm to configure

Similar Messages

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

  • Oracle graphics(Bar chart) error

    Hi All,
    I have developed a Bar chart using graphics builder 6i and it is running but when the y axis value larger (say 9999999) then axis lable getting symbol as star(*). Also Bar column Label getting symbol as star(*). What is the problem? Is it possible to show the higher value like 1000->1k,400000->400K in axis label and in Bar field label and how? Please help ASAP.
    Thanks in advance.
    Regards
    Sanjit Kumar Mahato

    Hi,
    Try SPRO. Do not know the path by heart...
    Basic systems -> Frontend services -> Graph/Net
    Best regards,
    Guillaume

  • Stacked Bar Chart Question

    Hi, I am creating a stacked bar chart, and I am encountering 3 issues I hope you can help me with:
    1)  The chart has positive and negative values.  I have zero based centerline checked, but I do not see 0 on the Y axis.
    2)  The applet width is 900 pixels.  The chart can have a variable number of bars.  When it has a small number of bars, they fill the entire chart.  Is there a way to set the width to a fixed amount?
    3)  Is there a way to set a logical interval amount?  Currently the numbering is not intuitive.
    Thanks
    p.s.  We are using 11.5.3
    Edited by: Richard Keegan on Jun 13, 2008 5:18 PM

    Depending upon your query structure, you can force a zero based centerline by setting the Y-axis ranges dynamically.  I am not working in 11.5.3 currently, but ran into a problem with line charts in 12.0.2.  The zero centerline flag did not work, so I dynamically generated the ranges and linked them in.
    You can probably do the same with a little extra BLS coding.
    Mike

  • Question regarding 3-D stacked bar chart

    Hi All,
    I'm creating a report that has a view of a horizontal stacked bar chart. I was wondering if there's a way to portray that stacked bar chart as a 100% stacked bar chart like in ms excel?
    Thanks,
    Wayne

    Hi Wayne,
    I'm not sure if I understand your query correctly but I'll have a go at answering your question. I'm guessing that you have a horizontal bar chart that looks something like this, even after you've indicated that you want it to be a stacked chart -:
    |{color:#ff0000}@@@{color}
    |{color:#008000}#########{color}
    |{color:#ff00ff}++{color}
    |{color:#0000ff}===={color}
    However, you want it to look more like this -:
    |{color:#ff0000}@@@{color}{color:#008000}#########{color}{color:#ff00ff}++{color}{color:#0000ff}===={color}
    For the purposes of the example, let's assume you are using two fields for the bar chart - Account Type and *# of Accounts*. By default, your chart options would be set such that Account Type is the value used for the Y axis and *# of Accounts* is the value used for the X axis. Indicating that you want a stacked graph results in the first graph example I listed above. However, if you indicate that Account Type is the value to be used for the measure labels and that there is no value for the Y axis, then a stacked graph will look like the second graph example I listed.
    Hope this helps to answer your question.
    Regards,
    Cameron

  • Embeding graphics bar chart

    Hi,,,
    I have to convert one of my reports made on 6i version which contains bar chart that is working on this version after upgrade to 10g I couldn't work with it because its depraceted what to do pls help
    Best Regards
    Maher

    Are you using Oracle Graphics? You'll have to use a chart item in the report for 10G: click the icon in the layout editor tool pallet, click into the layout editor, right-click the chart object and select the wizard.
    It's slightly different to Graphics and I don't know of any documentation of what your query should be like. So to get the right values on the right axes and in the right series might take a bit of trial and error.
    Does anyone have any documentation of what the structure of queries should be for each report type? I feel a new project coming on!

  • Setting legend layer attributes for SAP Bar Chart Graphics

    Hello!
    I'm using the SAP Bar Chart for displaying a calendar which is easily printable.
    Because the chart contains lines with colored layers without text I need to show a legend at the bottom of a printed page.
    I am using the CALL FUNCTION 'BARC_SET_LEGEND_ATTRIB' for setting up the legend and CALL FUNCTION 'BARC_ADD_LEGEND_NODE' to add the nodes/layers and texts to the legend.
    The only problem is that the width of each layer displayed in the legend in very narrow. Only ten letters are shown for each legend entry and this is not enough to display the meaning of my colored bars in the chart area.
    I tried changing layer-values in the bar chart customizing ( /ocng ) but nothing helped to make the legend entries wider.
    Does anyone have an idea?

    Hi,
    Try this link  
    [http://help.sap.com/saphelp_40b/helpdata/fr/52/670cd2439b11d1896f0000e8322d00/content.htm]
    You can find sample SAP reports for graph and graphics
    [http://www.erpgenie.com/sap-technical/abap/sample-codes-for-sap-graphs-a-graphics]
    Ben.

  • Stacked Bar Chart with Multiple Series Sort Question

    Hi,
    Apex version 4.1.1
    I have a stacked bar chart with three separate series, one showing customer effort, another showing project effort and the third showing other effort, summarized by calendar week. The x-axis of the chart is the calendar "week of" date, and the y-axis has a bar for each of the three series. Not every type of effort occurs every week.
    When AnyChart renders the chart, the order of entries on the x-axis seems to be dependent both on which series are present in a given week as well as the "week of" date. Weeks with all three series sort in order by calendar date, followed by weeks where just the 2nd & 3rd series are present, followed by weeks where just the 3rd series is present. See this [url http://tinypic.com/r/b9zdt/6] picture of the chart  noting the "week of" dates. Note that the months go Sep-Oct-Nov-Aug-Oct.
    Is there a way to force AnyChart to sort the x-axis in chronological order regardless of whether there is data for all three series for a given week? I have looked through the AnyChart XML reference but cannot find a way to do this.
    Incidentally, I can solve the sorting problem by combining all three series into a single query:
    select
      null as link,
      week_of as label,
      sum(customer_effort) as "Customer Effort",
      sum(project_effort) as "Project Effort",
      sum(other_effort) as "Training, Admin and Other Effort"
    from ...But if I do this, I cannot figure out how to have each bar on a given week link to a different detail page, e.g., if I click on a bar representing customer effort I want to link to one page, but if I click on a bar representing project effort, I want to link to a different page. I have had a look at the [url http://apex.oracle.com/pls/apex/f?p=36648:59:1570983160946101::NO:::] chart examples  posted on apex.oracle.com, but cannot figure out how to apply to multiple series in a single query.
    Thanks,
    Mike

    Thanks, Jeff. I did try this but for whatever reason it doesn't make a difference. I think it is because if there's no data for a given series for a certain week, there is no entry in the data set that is sent to AnyChart.
    I was able to get around the issue by "filling in" the missing weeks from each data series. To generate the list of "Week Of" dates for a given date range, I used this code:
    select
         trunc (each_day) as week_of,
         0 as effort
    from (
         select
              (to_date(:p920_start_date,:app_date_format) + 2 - to_char(to_date(:p920_start_date,:app_date_format),'D') - 1) + level each_day
         from dual
         connect by level <= to_date(:p920_end_date,:app_date_format) - to_date(:p920_start_date,:app_date_format) + 1
    where
         to_char (each_day, 'D') = '2'This creates an effort entry of 0 for each week within the date range; I use the Monday date of a week as the "Week Of" date. I then union this with my actual data and summarize by week and viola, I get the weeks in order. This also has the benefit of showing a week for which there are no entries in any of the three series.
    Thanks for taking a look at this.
    Mike

  • 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

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

  • SSRS - Report Builder 3.0 - Bar Chart

    Hi,
    I have Bar chart which shows number of items sold by Month , by year for the last two years
    My Query is something like
    Select Count(*) as NumOfItemsSold, Month(SaleDate) As MonthSold, Year(SaleDate)As YearSold From Sales where SaleDate in (DATEPART(Year,GETDATE()), DATEPART(YEAR, GETDATE())-1) GROUP BY Month(SaleDate), Year(SaleDate) Order BY Month(SaleDate), Year(SaleDate)
    THe Query works fine except for doesnt return any values for the months there are no sales and thus the bars doesnt show up in the chart. I want the chart to display 0 as Number of items sold and represent an empty space inthe chart. I am not sure how to
    do that.
    The Second Question is that I am bleto display the month name Abbreviated By usign the Expression MonthName(Fields!MonthSold.Value , TRUE) and Setting the interval  = 2 so my Chart would start showing values  feb, Apr, Jun etc ...
    I want to display the values starting from Jan with interval =2 for example Jan, Mar, May ...  not sure how to achieve that.
    Please let me know of any questions .
    Any help will be greatly appreciated.
    Thanks,
    Chaitanya

    Hi Chaitanya,
    To display the months that has NULL values, modify the Expression in the Values area of the chart to:
    =SUM(IIF(Fields!NumOfItemsSold.Value IS NOTHING, 0, Fields!NumOfItemsSold.Value))
    To make the labels on the horizontal axis start with January and an interval of two months, do the following steps (assuming that you have set the expression for category group to =MonthName(Fields!MonthSold.Value)):
    1. Click on the category axis, press F4 to highlight the Properties pane.
    2. Under Interval item, set its properties as follows:
        Interval: 2
        IntervalOffset: 1
        IntervalOffsetType: Number
        IntervalTpe: Number
    3. Under Sale item, set its properties as follows:
        Minimum: 0
        Scalar: True
    The following screenshot is for your reference:
    Regards,
    Mike Yin
    TechNet Community Support

  • Bar Charts with Non-Stacked Subgroups

    I'm trying to create a report in CR2008 for my elementary school principals that will display how many students received a specific grade each of the three marking periods (T1, T2, and T3) per grade level per subject area (Math, PE, etc.).  I was able to do this with a separate chart for each marking period, but would like to combine the charts into a single chart that has the grades (such as ADV, PRO, or BLB) across the bottom, and has the trimester scores as subgroups, so it looks something like this:
                   3    123     23   1     1
                  23    123    123   123   12
    Kinder Math  123    123    123   123   123    123
                 ADV    PRO+   PRO   APP   BASI   BLB
    Each of the grades would have three subgroups (bars) representing the three trimesters.  The y-axis scale would be the count of students who received each grade, with the maximum value set to the total number of active students at the end of the year (plus a small fudge factor in case the T3 enrollment is smaller than the T1 or T2 enrollment).
    The database (SQL Server 2005) I'm pulling from has table I'll call Grades; it's joined to a table called Students to get the grade level.  Each record in Grades has the following data in it (names have been changed to make them make more sense here, and only relevant fields are shown):
    StudentID, CourseNum, Section, T1_Active, T1_Grade, T2_Active, T2_Grade, T3_Active, T3_Grade
    If a student was enrolled in a specific CourseNum and Section at the end of a marking period, the XX_Active field will be "A"; if it's not, it should be skipped in the counting.  Because of this it is very possible that the count for a specific grade/trimester is zero, especially at the outliers (ADV and BLB).
    In Chart Expert >> Data >> Advanced, the current charts are set up using:
    On change of Grade.T1_Grade
    Show value(s): Count of Grade.T1_Grade
    (Substitute T2 or T3 for the second and third charts.)  Unfortunately, I have no clue what to choose for these values to get a combined chart.
    My questions:
    1) Does CR support bar graphs with subgroups that aren't stacked?  Does it support having three subgroups?
    2a) If so, what would be my next step to making this work?  Is the secret in running totals, formulas, arrays, or something else?  Maybe creating a view in the database that rearranges the data to make it easier to work with?
    2b) If CR doesn't support this directly, would it be worth while to fake it with six separate bar charts u2013 a chart just for ADV next to a chart just for PRO+, etc. u2013 or would the performance penalty be too much?  Would I need to have them each in their own subreport, or could they all live on the same level?  Is this the way I'd need to go if I also wanted to put trend lines over or above each letter grade group?
    Thank you in advance for any pointers you can give me.
    Jim
    Edited by: jimsteph on Jul 8, 2010 2:33 PM

    If you can create a view, that would be very helpful, by making the view, you are pushing some of the work to the
    server, so... "Hopefully" the report will be quicker. I don't think making six seperate charts would be all that much load on the
    server, or cr. If you do that, would you stack the charts? and just make the top stacks with Transparent backgrounds?
    Rather than add a view on the server u2013 there's talk that the next version of the gradebook program will completely refactor the database u2013 I did a SQL Command (I can't remember where I read about that tip over the last couple of feverish days, but my hat's off and I owe someone a frosty adult beverage!) that created a simplified table.  I then used that to create a Cross-Tab (my original report approximated one using a whole bunch of Running Totals).
    I then tried to make the chart, and got completely frustrated u2013 again u2013 until I accidentally created a chart from the Cross-Tab (right-click on the Cross-Tab and choose Insert Chart ).  I had no idea you could do that, and it ended up being exactly what I wanted.
    I have CRXI, if you go to the Sample reports, you will see one called Chart.rpt, this has multiple examples of some of the
    charts you can create. Perhaps a 3D riser chart would meet your requirements. HTH If not, can you provide some different samples?
    I would have never thought to look for the samples.  Thank you!  Now that I've got my immediate problem solved it's time to look at the samples and see what possibilities exist for future reports.
    Jim

  • ECC 6.0 bar chart short dump

    We are starting an upgrade from 4.7(non-Unicode) to ECC 6.0(Unicode), using SAPgui for Windows (version 7.10).  In our 4.7 systems, the graphical bar chart on the Project Planning Board (txn CJ2C) works as expected.  However, in the 6.0 development system, before displaying the gantt chart, the system short dumps with CREATE_ERROR.
    I have searched the forums and looked through OSS notes and was unable to find anything that described the problem or was pertinent to our release.  I have debugged through the transaction and am finding that the short dump occurs in method cl_gui_barchart=>constructor around the following code:
    at line 83 if the system is unicode (which it is), the code calls method cl_gui_frontend_services=>check_gui_support, exporting 'ganttcontrol'/'usedataasstream' and expecting a result in variable l_guisupp_data_as_string.  When it returns from the check_gui_support method, l_guisupp_data_as_string is blank, so the next "if" statement raises an error that is not handled:
         if l_guisupp_data_as_string = abap_true.
         .....code not executed because the variable = abap_false.
         else.
         .....raise create_error.    <<<<< this is where the dump occurs.
         endif.
    Note that in the debugger, if I force l_guisupp_data_as_string to be = abap_true, the gantt chart/barchart displays as expected.  (gotta love the debugger)  But since it is standard SAP code I would prefer to resolve the problem without a modification and am hoping someone out there can point me in the right direction.
    This short dump occurs with gui versions 710 and lower.  (I personally am using sapgui version 710, patch level 7.)  Has anyone had problems like this with the graphical elements in SAP or does anyone have a suggestion as to why the gui is not displaying the barchart correctly in our unicode system?
    Sorry for the very long message, but thanks in advance for the help!
    Amanda Salt
    Edited by: Amanda Salt on Jun 17, 2008 11:14 PM

    We are starting an upgrade from 4.7(non-Unicode) to ECC 6.0(Unicode), using SAPgui for Windows (version 7.10).  In our 4.7 systems, the graphical bar chart on the Project Planning Board (txn CJ2C) works as expected.  However, in the 6.0 development system, before displaying the gantt chart, the system short dumps with CREATE_ERROR.
    I have searched the forums and looked through OSS notes and was unable to find anything that described the problem or was pertinent to our release.  I have debugged through the transaction and am finding that the short dump occurs in method cl_gui_barchart=>constructor around the following code:
    at line 83 if the system is unicode (which it is), the code calls method cl_gui_frontend_services=>check_gui_support, exporting 'ganttcontrol'/'usedataasstream' and expecting a result in variable l_guisupp_data_as_string.  When it returns from the check_gui_support method, l_guisupp_data_as_string is blank, so the next "if" statement raises an error that is not handled:
         if l_guisupp_data_as_string = abap_true.
         .....code not executed because the variable = abap_false.
         else.
         .....raise create_error.    <<<<< this is where the dump occurs.
         endif.
    Note that in the debugger, if I force l_guisupp_data_as_string to be = abap_true, the gantt chart/barchart displays as expected.  (gotta love the debugger)  But since it is standard SAP code I would prefer to resolve the problem without a modification and am hoping someone out there can point me in the right direction.
    This short dump occurs with gui versions 710 and lower.  (I personally am using sapgui version 710, patch level 7.)  Has anyone had problems like this with the graphical elements in SAP or does anyone have a suggestion as to why the gui is not displaying the barchart correctly in our unicode system?
    Sorry for the very long message, but thanks in advance for the help!
    Amanda Salt
    Edited by: Amanda Salt on Jun 17, 2008 11:14 PM
    I just installed the latest patch on the SAPgui, so I am now running:
    Release: 710 Final Release
    File Version: 7100.2.8.1039
    Build: 983952
    Patch Level: 8
    But I am still getting the short dump.  I have done extensive searches of SAP Help, OSS notes, and this and other forums (even just looking up the problem on "google") but can't seem to find anything that applies to this scenario.  I'm not very familiar with the methods in cl_gui_frontend_services, so if anyone can give me a pointer of where else I can look, I would greatly appreciate it!
    I also have edited the Subject line to be more informative about the problem

  • Stacked Bar Chart with data from a Web Service

    Hi,
    I'm working on Dashboard Design (version 14.0.1.287) and I'm trying to create a chart linked to data from a webservice.
    With a Year in input, my webservice gives an Amount per Cities and Products
    Data retrieved look like this (Sheet1) :
    Paris          Tablets          45
    Paris          Laptops          12
    Paris          Cellulars          89
    New-York     Tablets          56
    New-York     Laptops          36
    New-York     Cellulars          1
    Londres          Tablets          150
    Londres          Laptops          3
    Londres          Cellulars          45
    Then I use a Pivot Table (created manually in Excel) looking like this (Sheet2) :
                   Tablets     Laptops     Cellulars
    Paris          45          12          89
    New-York     56          36          1
    Londres          150          3          45
    The chart is a Stacked Bar Chart plugged on the previous Pivot Table
    I create 3 series (one per Product), values (X) are set with Amount
    Category labels (Y) are set with Cities
    The goal is to have a dynamic chart (series and categories must update if a new city or a new product appears)
    So my question is : how can I set up the chart directly with data retrieved from webservice on Sheet1?
    Thx a lot !
    Nicolas
    Edited by: nicolasheurtevin on Sep 14, 2011 4:58 PM

    hi
    First thing , bad news if you are using .Net framework 1,
    just forget it, Flex 2 doesn't work well with framework 1, but 2nd,
    good news, if you want to use webservices, you'll have to make an
    array of objects on .Net Side and send it as objects to flex, i saw
    an example on the net but i can't seem to remember where, on the
    other hand,if you want to simply use, like i do, HTTPSERVICE its a
    very nice way to talk with .Net and you can see my example here
    http://flex1-for-dummies.blogspot.com
    By the way, in your code, you have a request tag , but you
    aren't requesting anything, because if you were you would have to
    make like this
    <mx:request>
    <Artist>{yourinputtext.text}</Artist>
    </mx:request>
    So if you don't have an input text, you don't need a request
    tag, only the operation.

  • Stacked bar chart with percentage in Xcelsius

    Hi,
    I want to  create a stacked bar chart(Horizontal) for the following data
    Project 1  --- >    2140, 177,  288, 135
    Project 2  --->     856, 44, 658, 120
    For following status respectively
    Completed,      Pending ,Partially completed,  Not Started
    Project 1 and Project 2 will be on Y axis.
    I want this data to be divided in percentage.
    as shown below
    Project 1 |___135_____|___177_____|______2140_______|
    Project 2 | __44__|___120_____|________856__________|
    0              20           40 ........                          100
    How to achieve this in xcelsius?

    I don't understand why you are soying it is not possible.
    Actually I think it is and quite easily but maybe i missunderstand the question.
    But anyway, here is what I would do:
    In the spreadsheet, you can calculate the percentage of each status per project:
         Completed     Pending     Partially completed     Not Started
    Project 1     78.10%     6.46%     10.51%     4.93%
    Project 2     51.01%     2.62%     39.21%     7.15%
    And then select these data for the stacked bar chart. Here you get the graph you are looking for.
    Oli

Maybe you are looking for