Diplay Graph

Hi all,
I want to display a graph in output by comparing data in two alv's which are displayed in the same screen .
__Ranjit

see this thread.
Graph In ALV
http://help.sap.com/saphelp_bw33/helpdata/en/5d/ad993888a5b268e10000009b38f8cf/content.htm

Similar Messages

  • Help needed with passing data between classes, graph building application?

    Good afternoon please could you help me with a problem with my application, my head is starting to hurt?
    I have run into some difficulties when trying to build an application that generates a linegraph?
    Firstly i have a gui that the client will enter the data into a text area call jta; this data is tokenised and placed into a format the application can use, and past to a seperate class that draws the graph?
    I think the problem lies with the way i am trying to put the data into co-ordinate form (x,y) as no line is being generated.
    The following code is from the GUI:
    +public void actionPerformed(ActionEvent e) {+
    +// Takes data and provides program with CoOrdinates+
    int[][]data = createData();
    +// Set the data data to graph for display+
    grph.showGrph(data);
    +// Show the frame+
    grphFrame.setVisible(true);
    +}+
    +/** set the data given to the application */+
    +private int[][] createData() {+
    +     //return data;+
    +     String rawData = jta.getText();+
    +     StringTokenizer tokens = new StringTokenizer(rawData);+
    +     List list = new LinkedList();+
    +     while (tokens.hasMoreElements()){+
    +          String number = "";+
    +          String token = tokens.nextToken();+
    +          for (int i=0; i<token.length(); i++){+
    +               if (Character.isDigit(token.charAt(i))){+
    +                    number += token.substring(i, i+1);+
    +               }+
    +          }     +
    +     }+
    +     int [][]data = new int[list.size()/2][2];+
    +     int index = -2;+
    +     for (int i=0; i<data.length;i++){+
    +               index += 2;+
    +               data[0] = Integer.parseInt(+
    +                         (list.get(index).toString()));+
    +               data[i][1] = Integer.parseInt(+
    +                         (list.get(index +1).toString()));+
    +          }+
    +     return data;+
    The follwing is the coding for drawing the graph?
    +public void showGrph(int[][] data)  {+
    this.data = data;
    repaint();
    +}     +
    +/** Paint the graph */+
    +protected void paintComponent(Graphics g) {+
    +//if (data == null)+
    +     //return; // No display if data is null+
    super.paintComponent(g);
    +// x is the start position for the first point+
    int x = 30;
    int y = 30;
    for (int i = 0; i < data.length; i+) {+
    +g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);+
    +}+
    +}+

    Thanks for that tip!
    package LineGraph;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.List;
    public class GUI extends JFrame
      implements ActionListener {
      private JTextArea Filejta;
      private JTextArea jta;
      private JButton jbtShowGrph = new JButton("Show Chromatogram");
      public JButton jbtExit = new JButton("Exit");
      public JButton jbtGetFile = new JButton("Search File");
      private Grph grph = new Grph();
      private JFrame grphFrame = new JFrame();   // Create a new frame to hold the Graph panel
      public GUI() {
         JScrollPane pane = new JScrollPane(Filejta = new JTextArea("Default file location: - "));
         pane.setPreferredSize(new Dimension(350, 20));
         Filejta.setWrapStyleWord(true);
         Filejta.setLineWrap(true);     
        // Store text area in a scroll pane 
        JScrollPane scrollPane = new JScrollPane(jta = new JTextArea("\n\n Type in file location and name and press 'Search File' button: - "
                  + "\n\n\n Data contained in the file will be diplayed in this Scrollpane "));
        scrollPane.setPreferredSize(new Dimension(425, 300));
        jta.setWrapStyleWord(true);
        jta.setLineWrap(true);
        // Place scroll pane and button in the frame
        JPanel jpButtons = new JPanel();
        jpButtons.setLayout(new FlowLayout());
        jpButtons.add(jbtShowGrph);
        jpButtons.add(jbtExit);
        JPanel searchFile = new JPanel();
        searchFile.setLayout(new FlowLayout());
        searchFile.add(pane);
        searchFile.add(jbtGetFile);
        add (searchFile, BorderLayout.NORTH);
        add(scrollPane, BorderLayout.CENTER);
        add(jpButtons, BorderLayout.SOUTH);
        // Exit Program
        jbtExit.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
             System.exit(0);
        // Read Files data contents
         jbtGetFile.addActionListener(new ActionListener(){
         public void actionPerformed( ActionEvent e) {
                   String FileLoc = Filejta.getText();
                   LocateFile clientsFile;
                   clientsFile = new LocateFile(FileLoc);
                        if (FileLoc != null){
                             String filePath = clientsFile.getFilePath();
                             String filename = clientsFile.getFilename();
                             String DocumentType = clientsFile.getDocumentType();
         public String getFilecontents(){
              String fileString = "\t\tThe file contains the following data:";
         return fileString;
           // Register listener     // Create a new frame to hold the Graph panel
        jbtShowGrph.addActionListener(this);
        grphFrame.add(grph);
        grphFrame.pack();
        grphFrame.setTitle("Chromatogram showing data contained in file \\filename");
      /** Handle the button action */
      public void actionPerformed(ActionEvent e) {
        // Takes data and provides program with CoOrdinates
        int[][]data = createData();
        // Set the data data to graph for display
        grph.showGrph(data);
        // Show the frame
        grphFrame.setVisible(true);
      /** set the data given to the application */
      private int[][] createData() {
           String rawData = jta.getText();
           StringTokenizer tokens = new StringTokenizer(rawData);
           List list = new LinkedList();
           while (tokens.hasMoreElements()){
                String number = "";
                String token = tokens.nextToken();
                for (int i=0; i<token.length(); i++){
                     if (Character.isDigit(token.charAt(i))){
                          number += token.substring(i, i+1);
           int [][]data = new int[list.size()/2][2];
           int index = -2;
           for (int i=0; i<data.length;i++){
                     index += 2;
                     data[0] = Integer.parseInt(
                             (list.get(index).toString()));
                   data[i][1] = Integer.parseInt(
                             (list.get(index +1).toString()));
         return data;
    public static void main(String[] args) {
    GUI frame = new GUI();
    frame.setLocationRelativeTo(null); // Center the frame
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("Clients Data Retrival GUI");
    frame.pack();
    frame.setVisible(true);
    package LineGraph;
    import javax.swing.*;
    import java.awt.*;
    public class Grph extends JPanel {
         private int[][] data;
    /** Set the data and display Graph */
    public void showGrph(int[][] data) {
    this.data = data;
    repaint();
    /** Paint the graph */
    protected void paintComponent(Graphics g) {
    //if (data == null)
         //return; // No display if data is null
    super.paintComponent(g);
    //Find the panel size and bar width and interval dynamically
    int width = getWidth();
    int height = getHeight();
    //int intervalw = (width - 40) / data.length;
    //int intervalh = (height - 20) / data.length;
    //int individualWidth = (int)(((width - 40) / 24) * 0.60);
    ////int individualHeight = (int)(((height - 40) / 24) * 0.60);
    // Find the maximum data. The maximum data
    //int maxdata = 0;
    //for (int i = 0; i < data.length; i++) {
    //if (maxdata < data[i][0])
    //maxdata = data[i][1];
    // x is the start position for the first point
    int x = 30;
    int y = 30;
    //draw a vertical axis
    g.drawLine(20, height - 45, 20, (height)* -1);
    // Draw a horizontal base line4
    g.drawLine(20, height - 45, width - 20, height - 45);
    for (int i = 0; i < data.length; i++) {
    //int Value = i;      
    // Display a line
    //g.drawLine(x, height - 45 - Value, individualWidth, height - 45);
    g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);
    // Display a number under the x axis
    g.drawString((int)(0 + i) + "", (x), height - 30);
    // Display a number beside the y axis
    g.drawString((int)(0 + i) + "", width - 1277, (y) + 900);
    // Move x for displaying the next character
    //x += (intervalw);
    //y -= (intervalh);
    /** Override getPreferredSize */
    public Dimension getPreferredSize() {
    return new Dimension(1200, 900);

  • How do I make an XY-Graph plot points over time?

    I am building a program to plot and take data of a relationship between two voltages.  One is voltage is uniquely dependent on the other.  So far I have successfully built an XY-Graph to plot the voltages against each other (Voltage1 along the x-axis and Voltage2 along the y-axis).  However, the XY-Graph only diplays the point (V1, V2) at the instantaneous time I am looking at it, and does not continuously plot different points as I vary the independent voltage.  I need the graph to display all the points that occur as I vary the independent voltage.  As of right now, all I see is one little cursor that moves all over the graph as I vary it.  My program consists of a While Loop that contains all of the following:  two seperate data anolog input functions that take both voltage separately from my board.  The the output samples from each 'AI Sample' function are then bundled into one cluster using the 'bundle' function.  The cluster output from the 'bundle' function is then wired to a 'build array' function.  The 1-D array output from the 'build array' function is then wired to my 'XY-Graph'.  How do I get the XY-Graph to plot a point every millisecond or so?

    Bundling and then using the Build Array is not correct. Yuo can see the correct method in the help for an XY Graph below. In order to use the normal XY Grpah, you would have two shif registers. One for the X array and one for the Y. Bundle the two arrays and then wire to the graph.
    The other way is to use the Express XY Graph. With that, you can just wire your scalars to the X and Y inputs and set the Reset input to false.
    Message Edited by Dennis Knutson on 11-12-2007 06:32 PM
    Attachments:
    XY Graph 1.PNG ‏21 KB
    XY Graph 2.PNG ‏6 KB

  • Display counter output on graph

    I have two counters generating continuous digial pulse trains from my PCI 6010, and I'm trying to display the output on a graph.  I've got the output of one counter connected to an AI line that leads to a waveform graph, but I can't get anything on the graph.  I've measured the output via external means, so I know the counters are generating the appropriate pulses.
    Eventually I'd like to have some sort of indicator for each counter that indicates whether the counter is in the 'on' or 'off' state, but I figured getting the counter outputs to diplay on a graph would be a good first step.
    My VI is below; the display part that isn't working is at the bottom of the case structure.
    Thanks.

    Once your code goes into the inner while loop your graph will never be updated since it will only execute one time. In order to update the graph continually you will need a parallel which handles the graph updates. A good way to pass data between the parallel tasks is a queue.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Waveform graph update indicator

    I am updating a waveform graph several times inside a loop and i want an LED to light up each time it updates. Are there any waveform properties which will help me achieve this

    This is actually a bit unclear. What do you define as an "update"? Do you have "synchronous diplay" set? Do you consider it an "update" if you send the same data again to it?
    It would make more sense to define a boolean that is lit whenever the graph data changed. Just put the graph data in a shift register and compare the current data to the data from the previous loop iteration.
    LabVIEW Champion . Do more with less code and in less time .

  • Graph - time?

    hi
    I have a small problem with the "waveform graph" - what I want is the X-axis to diplay the time (this is easy:-) ) but I want the time to start at Zero and the display seconds from when I start the VI?? when I choose "relative time" its displaying seconds but not from zero?? - another thing: the data displayed in the graph I also write to a spreadsheet file and I then use the "tick count [ms]" which is also written to the spreadsheet in order to get a "timestamp" for each datapoint!! this works ok! but isent there someway that the graphblock can give the timestamp?? hope you understand what I mean?? 

    Hi Viller,
    I still didn't get it all, but if you don't have a timestamp for every Y-value, you need to create it for yourself. For an example I made a solution in the simple and the cool way:
    Greets, dave
    Message Edited by daveTW on 02-27-2007 11:56 AM
    Greets, Dave
    Attachments:
    Example_BD.png ‏7 KB

  • Suppress cumulated colums in WAD graph

    Hiya,
    I have a report with 2 columns
    First is cumulated budget for the full year.
    Second is cumulated actuals up until the current reporting period.  In this case this is september.
    These are to be diplayed in a line graph on the web.
    The first column is fine, but the second column continues through to december with a flat line for Oct to Dec as it is a cumulated value.
    Any ideas on how not to display the actuals past September but to still display the line for budget.
    Cheers
    James

    Is there any solution for this? I have got the same problem.

  • Graph is not getting displayed in R12

    Hello folks,
    Cureently m working on R12 upgrade project.
    And we have a report which is working fine 12 but the graphs are not getting displayed as like 11i.
    Could you plz any one help how to fix the issue.
    Note: There is no error is coming up. But in the graph part , graph is not getting displayed.
    Regards,
    Krishna

    Hello folks,
    Cureently m working on R12 upgrade project.
    And we have a report which is working fine 12 but the graphs are not getting displayed as like 11i.
    Could you plz any one help how to fix the issue.
    Note: There is no error is coming up. But in the graph part , graph is not getting displayed.
    Regards,
    Krishna

  • How can I display data gathered in a subVI in a graph of the main VI?

    I have written a largish application (~50 VI's) which acquires, analyzes, display and saves data from an instrument with a built-in DAQPad. My problem is that my block diagram is rather messy by now. I'm using an event structure in my main VI which reacts to buttons being pressed on the front panel. During data acquisition (one frame of the event structure), I need to do a lot of data processing, and I'm displaying both raw data and analyzed data on the front panel. I'm using a lot of subVI's for this, but I always need to get data out of the subVI's again to display it on the front panel, cluttering my block diagram. It would be much nicer if the subVI could update the main VI's graphs and indicators. I just found two examples with control references which show how a subVI can modify e.g. a 3Dgraph of the main VI, but I'm unable to use this with normal graphs and charts - I can't find a way to update the actual data in the plots (I can scale the plot or color it blue etc - but I really want to change the data it's displaying, not color it blue). Is there anything I'm missing? Is there example code for this kind of problem?
    best regards
    Martin

    im assuming that you want to update your graphs and indicators as you are performing your DAQ, otherwise, you can pass out your value/s when the DAQ completes.
    I have attached a very simple example of using a reference to update your front panel graph.
    Hope this helps.
    Attachments:
    Reference Example(LV7.1).zip ‏17 KB

  • How can I print out the graph I need only, without the controls and indicators?

    I'm doing some programming in LABVIEW. I need to print out only the graph, without the buttons, controls, indicators. I tried to look for such a function in LABVIEW, but in vain. How can I achieve the result I expect in my programming?

    Hi Fenny,
    you should use the report generation functions to create a report containing your graph image and print it.
    Take a look at the Sample Test Report.vi you find in the report examples of LV.
    Just look at the part of the diagram where it is used Append Control Image to report.vi (in the center of the report functions chain); a graph reference is wired to the Ctrl reference input ( to create a reference of your graph right click on it and select create reference).
    Let me know if you need more help,
    Alberto

  • Hiding a hierarchy column in graph view

    Hi All,
    In an compound layout I would like to have pivot view and bar chart view.
    There are two hierarchy columns in criteria. These column should display in pivot view.
    My requirement is to hide the hierarchy columns in Bar chart view and can we apply separate selection steps for each view.
    Kindly help me..
    Thanks,
    Haree

    Hi,
    Edit the pivot table and graph and at the below you can see the selection steps for the individual components. So that you can give separately for each of the components.
    Hope this helped/ answered.
    Regards
    MuRam

  • Silver graph performanc​e (apparent serious 2011 flaw)

    I noticed that cpu usage was quite high for some VIs and ended up finding out with simple comparison benchmarks (using performance and memory test) that a VI with the new silver graph runs about 25 times slower than a vi with the old, uh, modern graph at default graph size.  For a graph widened to cover a wide screen, it decreased to about 190 times slower, a horrible crawl.  For the test I just generated random numbers put into a 2000 element 1D array to be graphed (couldn't attach the test VIs for some reason). 
    The silver graph looks nice, but what in the world is going on here?
    Jesse

    Nice to know
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway

  • Regarding graph in obiee 11g

    Hi All,
    i have some reports that has graph. in that graphs some graph is coming and some is not coming
    and giving error shown below.
    Graphing engine is not responding.
    A fatal error occurred while processing the request. The server responded with: oracle.bi.nanserver.fwk.exception.BISvsException: java.lang.NumberFormatException: For input string: "05:30".
    i have checked the services all are up and running.
    please help me to solve the problem.

    Issue was, Font been defined as 7.5 (may be font size decimal not supported ).the problem solved

  • Rwbld60.exe error while calling a graph wizard from reports 6i.

    Hi,
    I have a latest patch 4f installed on my machine for reports 6i. When i call a graph wizard from my reports i am getting a program error saying "rwbld60.exe has generated errors".
    How do i confirm that my new patch is installed successfully.
    Thanks in adv.
    Shailesh

    I'm getting this also. I thought it was
    due to my use of DATA PARAMETER. I've
    logged TARS on this and have yet to hear
    back from Oracle.
    Maybe if enough of us get the error Oracle
    will give some guidance on this one.

  • Printing problem with PDF graphs from preview

    Whenever I print PDF files from preview or from safari, some graphs print incorrectly, although they are displayed correctly on the screen.  This only happens with black and white figures and either a negative image with the black and white are reversed is printed or the background of the graphic just prints as a black box.  Colour elements are unaffected.  This doesn't happen when printing the same files using Adobe Reader or Adobe Professional.  Any suggestions for tweaking this, or am I going to have to start using the Adobe plugins instead?

    Please try it on Adobe Reader version 10.1.0 ,  Please note that this forum is for Adobe Reader on android and not for PDF Viewer.
    -vaibhav

Maybe you are looking for

  • Need ALV LIST for displaying Dynamic Internal Tables

    Hi Guys,                  I have some thing like 2 Dynamic internal tables. Say 1st Internal table will be filled based on some condition. say 2nd table will be filled based on some condition. When appending the 1st Internal table, if that internal t

  • Jerky Play

    I have Just Re-Installed Elements 11 into my PC and loaded AVCHD Files into a new project but It does not play in real time video is Jerky

  • 11g sort table programmatically

    Hi, I am using a table in 11g. In the vo query i added 'order by date desc' - which should display the table rows sorted with latest date. To insert new row i am using a popup in which the table also displayed. On click of a button i need to open the

  • Configuring Business Package

    Hi , I am in the process of configuring business package.I want to enable the employee bank details information iview.I have install the business packages. I have created till the JCO Connections they are working perfectly and i am struck at creation

  • Import schema from datafile

    Here is the situation: We are decommissioning an Oracle 9.2 database, but we need to move the contents of one of the schemas into a 10g database. Ordinarily, we'd use the legacy export and import tools to do this, but in this case we can't (due to th