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

Similar Messages

  • 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();

  • Clickable pie chart in sapui5

    Hi,
    how to display clickable pie chart in sapui5?
    when i click on particular area on the pie chart it need to give a popup showing all the information about that.
    Thanks & Regards
    Chitti Babu

    hi,
    Pie chart has 'selectdata' event which can be registered to an event handler.
      Please refer below sample code:
    pie.attachSelectData(selPiefn);
    selPiefn=
    function(oEventParam){
    var oSelectData = oEventParam.getParameter("data");
    Thanks,
    Monalisa

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

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

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

  • 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

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

  • Custom table model, table sorter, and cell renderer to use hidden columns

    Hello,
    I'm having a hard time figuring out the best way to go about this. I currently have a JTable with an custom table model to make the cells immutable. Furthermore, I have a "hidden" column in the table model so that I can access the items selected from a database by their recid, and then another hidden column that keeps track of the appropriate color for a custom cell renderer.
    Subject -- Sender -- Date hidden rec id color
    Hello Pete Jan 15, 2003 2900 blue
    Basically, when a row is selected, it grabs the record id from the hidden column. This essentially allows me to have a data[][] object independent of the one that is used to display the JTable. Instinctively, this does not seem right, but I don't know how else to do it. I know that the DefaultTableModel uses a Vector even when it's constructed with an array and I've read elsewhere that it's not a good idea to do what I'm trying to do.
    The other complication is that I have a table sorter as well. So, when it sorts the objects in the table, I have it recreate the data array and then set the data array of the ImmutableTableModel when it has rearranged all of the items in the array.
    On top of this, I have a custom cell renderer as well. This checks yet another hidden field and displays the row accordingly. So, not only does the table sort need to inform the table model of a change in the data structure, but also the cell renderer.
    Is there a better way to keep the data in sync between all of these?

    To the OP, having hidden columns is just fine, I do that all the time.. Nothing says you have to display ALL the info you have..
    Now, the column appears to be sorting properly
    whenever a new row is added. However, when I attempt
    to remove the selected row, it now removes a seemingly
    random row and I am left with an unselectable blank
    line in my JTable.I have a class that uses an int[] to index the data.. The table model displays rows in order of the index, not the actual order of the data (in my case a Vector of Object[]'s).. Saves a lotta work when sorting..
    If you're using a similar indexing scheme: If you're deleting a row, you have to delete the data in the vector at the INDEX table.getSelectedRow(), not the actual data contained at
    vector.elementAt(table.getSelectedRow()). This would account for a seemingly 'random' row getting deleted, instead of the row you intend.
    Because the row is unselectable, it sounds like you have a null in your model where you should have a row of data.. When you do
    vector.removeElementAt(int), the Vector class packs itself. An array does not. If you have an array, when you delete the row you must make sure you dont have that gap.. Make a new array of
    (old array length-1), populate it, and give it back to your model.. Using Vectors makes this automatic.
    Also, you must make sure your model knows the data changed:
    model.fireTableDataChanged(); otherwise it has no idea anything happened..
    IDK if that's how you're doing it, but it sounds remarkably similar to what I went thru when I put all this together..

  • 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

  • Strangenesses of sorting and color charts of traffic reports Cisco SCA Reporter

    Strange behaviour of Reporter applitation from Cisco Service Control Application (SCE). Problem is that traffic types are being sorted in different ways on graphs build with "reportercmd" command and GUI version of Reporter.
    Another problem is that Windows and Linux versions of "reportercmd" command sort traffic types equally, but graphs of the same traffic type has different colours.
    We'd like that console "reportercmd" sorting order was just the same as in the GUI version - it is more visually clear when torrent traffic is above the rest of the graphs.
    I tried to set different values for diffrent traffic types in this file:
    "reporter\plugins\com.cisco.p3.apps.scasbbtemplates_3.7.2\templates\colors.ini"
    - but that traffic types did not change their colours. For instance, the following configuration:
    service.Non-Encrypted\ Bittorrent = 132,115,46
    service.Encrypted\ Bittorrent = 198,195,255
    - has no effect. Linux and Windows configurations were the same.
    Graphs were built with the following command:
    ./reportercmd -template "Global Bandwidth per Service" \
    -dbdriver "com.mysql.jdbc.Driver" \
    -dburl "jdbc:mysql://IP-MySQL:3306/apricot" \
    -dbuser "pqb_admin" \
    -dbpassword "pqb_admin" \
    -policysce "IP-SCE" \
    -params "titleText=Global Bandwidth per
    Service;numhours=48;trafficdir=Downstream;showSce=false;avgdata=fals
    -size 800x600 \
    -format png -o gbps1-10.png \
    -hierarchy "sorted;1;10"

    Hi Harry (and others),
    I have seen similar behavior. It seems like the client side rendering for some reason has a hard time processing the collection model wrapping the ArrayList in this particular case. The table renders empty. After sorting in ascending order, the rows are all back (visible) again.
    Is anyone aware of issues with the rich table based directly on ArrayList (in combination with a changing set of values and/or sorting)? (seems like a corner case but is still not uncommon). Is there any indication that wrapping the ArrayList in a CollectionModel ourselves might be required?
    Harry: do you know whether this issue is introduced with PS3 (11.1.1.4) or already existed in previous releases?
    kind regards,
    Lucas

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

Maybe you are looking for

  • ITunes crashes every time i try and update genius.

    I have itunes 10.1.2 and every time i try and update my genius it gets to 75% done and then I get the pin wheel and iTunes does not respond. I have heard people having this problem with older versions of iTunes but no one having it happen recently. A

  • Need help with a unique WMV export

    Hi, everyone! This is my first post on this board. I have a sequence in Final Cut Pro that is three 640x480 clips laid out end-to-end to make a 1920x480 movie. The total length of the program is 7-8 minutes. I am needing to export this from Compresso

  • Display As Text (Saves State) as a Link in an updateable report

    I'm running into an odd problem when attempting to use display as text(saves state) in a report as a link. I have an updateable SQL report with the following columns in this order 1) A checkbox column 2) A column as a link using the Link Text attribu

  • How do I get pass the Enter Passcode on my i-phone 5s

    How do I by-pass the Enter Passcode on my i-phone 5s

  • Transition between two HR master records

    We are using CATS and have some 1000 users reporting time, so the HR personnel number is also updated in financial line items. Now due to a new HR solution we will need to assign all people with a new HR personnel numbers. My question is how we can k