Simple line graph problem

Hi there,
I want to create a very simple line graph, containing 1 line. Therefore i create a Graph.LINE_VERT_ABS type Graph and add the data using myGraph.setLocalRelationalData(al ArrayList). This arraylist contains values in the form of
setname jan 12.2
setname feb 14.5
setname march 8.1
etc
When i do this, I get the errormessage: "The data has an insufficient number of columns. This graph type requires at least 2 columns of data. The data provided has one column.".
When i add another dummy value to the arraylist:
dummy dummya 1
dummy dummyb 2
the graph displays correctly, but only with a additional line for the dummy values, also in the Legend.
What am i doing wrong. Surely it is possible to display just one line in the Graph??
Any help is appreciated.
Linda

In the arraylist, setname identifies a column. By default, columns are plotted as groups, or different points along the horizontal axis. In order to have a line or area graph, you need two groups. The data that you are passing has 1 group and 3 series. You should pass it as follows:
jan setname 12.2
feb setname 14.5
march setname 8.1
etc.
Passing data like this will give you three groups (jan, feb, march) and one series (setname).
By the way, what version of BI Beans are you using and how did find out about setLocalRelationalData? That API was never publicly released. It was replaced by setTabularData (same method renamed) and exposed in 9.0.3.
BI Beans Product Management

Similar Messages

  • Help me with a simple line-graph, plzzzzzzzz.

    hi!
    can anyone give me the basic java code to create a simple line graph for my java program output.
    thanks a lot in advance.
    cheers!

    Have a look at the Graphics.drawPolyline() method.
    kind regards,
    Jos

  • Line Graph Problem when used with Series

    I am facing a problem with Line Graph in Oracle Reports 10g.
    I have made a graph having series of three curves.
    The graph is perfect when all series have similar X-Axis values. See the link
    http://www.sysautomation.com/ask/RPT_LINE_GRAPH_OK.PDF
    But same graph does not print curves properly, gives spaces in the curves, when all the series do not have similar values on X-Axis
    http://www.sysautomation.com/ask/RPT_LINE_GRAPH_NOT_OK.PDF
    Pl. guide me what to do to make this graph working.

    Thanks for reply.
    In my case, I have to plot curves.
    and some Series have different X-axis values.
    I have no choice, but to plot them.
    The same thing was working fine with Reports 6i + Graphics 6i.
    What is Scatter Plot?
    Thanks again.
    This is a limitation in the current line graph in
    Reports 10g (9.0.4). I can't recall whether this has
    improved in 10.1.2 or it was planned for the next
    rev.
    Would trying a scatter plot be better?
    Line graphs are normally meant for regular intervals
    on x-axis, so using the example of dates, Jan, Feb
    and Dec would be placed right next to each other,
    rather than scaled with the right distance between
    Feb and Dec.

  • Help creating a simple line graph

    Hi
    Im very new to the Java language, yet have some background knowledge of C and C++.
    i have a problem with an application i am developing for a university assignment, the program is to simply simulate a water pressured nuclear reaction. the main JFrame holds various JLabels that show the current core temperature, electricity produced etc. But i want to add a very simplistic line graph to the same window, it is to purely show a line that updates (no axis or labels). The graph is to illustrate how much electricity was produced on the current cycle of the reactor, the user can initiate each cycle by pressing a JButton.
    i have found some info on drawing, but cannot find anything that helps.
    Any info on how to do this (its only meant to be a samllish part of the main window), any code examples or sites that have a very relevant tutorial would be appreciated.
    Sorry for the length of this, and if anyone needs any more info on this then let me know.
    thanks

    Cross posted,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=394494&tstart=0&trange=15

  • Line Graph problem plz help :(

    Problem fixed
    Message was edited by:
    bm_za

    Thanks for reply.
    In my case, I have to plot curves.
    and some Series have different X-axis values.
    I have no choice, but to plot them.
    The same thing was working fine with Reports 6i + Graphics 6i.
    What is Scatter Plot?
    Thanks again.
    This is a limitation in the current line graph in
    Reports 10g (9.0.4). I can't recall whether this has
    improved in 10.1.2 or it was planned for the next
    rev.
    Would trying a scatter plot be better?
    Line graphs are normally meant for regular intervals
    on x-axis, so using the example of dates, Jan, Feb
    and Dec would be placed right next to each other,
    rather than scaled with the right distance between
    Feb and Dec.

  • Line graph problem in numbers

    How can I change. the thickness of lines when using the line diagram in numbers. I want to see 3 lines that are relatively close to each other but because they are very thick they overlay each other.

    There isn't a way to change the shape. Your options are to change the graph type, or to make the graph larger (should correct the overlap problem).

  • Simple FFT graph problem

    Hi to all,
    The problem is: I have  a 100Hz sine in a text file (sampled at
    800Hz), and when try to see the FFT of that signal, the dominant
    frenquency should be around 100Hz, but doesn't happen. I think that's
    because the "Convert to Dynamic Data" VI, but how can I solve this? The
    VI and the signal file goes in attachment.
    Thanks in advance.
    Ricardo.
    Attachments:
    analise_sinal.vi ‏81 KB
    sine_100hz.txt ‏685 KB

    Before converting the array into the Dynamic Data type, convert it into a waveform type.  Feed the data into the Y element of the waveform cluster and enter the inverse of the sampling rate into the dt element of the waveform cluster.  Feed the waveform data into they Covert to Dynamic Data and change the properties of it to accept a single 1D waveform.  Your frequency info will then appear in the FFT.
    Looking at your data, if this sine wave is at 100 Hz then it is not sampled at 800 Hz.  It is sampled at a higher rate.
    Randall Pursley
    Attachments:
    Data Convert.PNG ‏14 KB

  • Creating a Line Graph in a JSP...

    ive got to create a simple line graph (ability to have a title, xaxis, yaxis labels, plus label the data on hte x and y axis). right now the yaxis date is stored in an array of doubles and the xaxis just increment by 1. im having problems finding such a thing on the internet that doesnt depend on other classes or beans besides teh ones built into the jdk. i can have no other 3rd party software, is there anything like this out there? any java functions? thanks.
    Adam.

    Hi
    Keep in touch with the following thread, which is going in parallel, which is same as yours.
    http://forums.java.sun.com/thread.jsp?forum=45&thread=286179
    Thanks
    Swaraj

  • Help needed in plotting Line Graph!!!!!!!!!Pls help!!

    Hi, i need help in plotting a simple line graph showing the x&y axis and has to plot 3 different lines in the same graph.I have written a program and i need to implement this graph in it.Is there any tutorial for plotting line graphs,i mean steps included.
    Please help!

    You describe your need, but not where it originates from.
    Is it a programming assignment? If so, I hope this is not your chosen major, as you will fail because you are a non-resourceful plagarist.
    Do you need to simply graph some data? Use an existing package. There are free ones somewhere.
    What do you mean "i have written a program and i need to implement this graph in it"? If you wrote the program, wouldn't you be done?
    Enjoy programming

  • Help needed in plotting line graph!

    Hi i need help in plotting a line graph complete with both axes shown,plus the legend on the side shown.
    Pls help!!!!
    rgds

    Here's a simple line graph applet I did some time backimport java.awt.*;
    public class LineGraff extends java.applet.Applet{
       double []toGraff = {6.0, -14.0, -164.0, -210.0, 108.0, 770.0,
                                1354.0, 896.0, -572.0, -1348.0, -780.0, -108.0};
       double []numsFromFile = {6.0, -14.0, -164.0, -210.0, 108.0, 770.0,
                                1354.0, 896.0, -572.0, -1348.0, -780.0, -108.0};
       int max, min, size, Hscale;
       double Vscale;
       public void init(){
          size = numsFromFile.length-1;
          java.util.Arrays.sort(numsFromFile);
          max = (int) numsFromFile[size];
          min = (int) numsFromFile[0];
          Vscale = max-min;
          Vscale = 200/Vscale;
         Hscale = Math.round(300/size);
       public void paint(Graphics g) {
          g.setFont(new Font("Arial",0,14));
          g.drawString("Example app: drawing a graph from a double array",25,18);
          g.setFont(new Font("Arial",0,10));
          g.setColor(Color.blue);
          g.fillRect(10,20,365,230);
          g.setColor(Color.cyan);
          g.drawLine(25,25,25,225);
          g.drawLine(25,140,330,140);
          g.setColor(Color.white);
          int intA = 30, intB = 0, intC = 0;
          int intD = (int) (Math.round(140 - (Vscale * toGraff[0])));
             for(int i=1; i <= size; i++) {
               intC = intA + Hscale;
               intB = intD;
               intD = (int) (Math.round(140 - (Vscale * toGraff[ i ])));
               g.drawLine(intA, intB, intC, intD);
                  if(toGraff[ i ] > 0)
                     g.drawString(Double.toString(toGraff[ i-1 ]), intA+6, intB-3);
                  else
                     g.drawString(Double.toString(toGraff[ i-1 ]), intA+6, intB+8);
               intA += Hscale;
          g.drawString(Double.toString(toGraff[size]), intA+6, intD-3);    
    }

  • Numbers Line Graph is more annoying than Miley Cyrus

    Hello and thanks for taking time to read and answer my question.  So I have a science fair project coming up and numbers is being very annoying.  My experiment is testing the affect of temperature on the effectiveness of magnets.  My table looks like this: 
    Magnet 1
    Magnet 2
    Magnet 3
    Magnet 4
    Magnet 5
    Average
    74 Degrees
    40g
    42g
    50g
    27g
    38g
    39.4
    200 Degrees
    28g
    25g
    35g
    46g
    38g
    34.4
    250 Degrees
    62g
    39g
    10g
    53g
    29g
    38.6
    300 Degrees
    34g
    19g
    36g
    23g
    41g
    30.6
    350 Degrees
    26g
    21g
    17g
    36g
    37g
    27.4
    All I want to do is make a simple line graph that will show the correlation (or lack of one) However, when I try to make it into a graph, I keep either getting no lines at all or only the line for the average.  Why is this?  What am I doing wrong?  Help is greatly appreciated.
    Thanks so much,
    Colton
    I'm using numbers 3.1 by the way.

    Hi Colton,
    "I keep either getting no lines at all or only the line for the average.  Why is this? "
    It's because the column labeled Average is the only one containing numbers. Appending the g or " Degrees" forces Numbers to regard the values in the other columns as Text, which has no numerical value, and can't be graphed.
    With the text stripped from those numerical values you can produce either of these two graphs. See the notes below regrding the major differences.
    Scatter chart with connected points
    Line chart
    Cosmetically, the line graph appears with thicker lines connecting the data points, and with all symbols set to open circles. I thickened the connecting lines on the scatter chart to make them more visible, and made the Average line about 40% thicker than the others. No changes were made to the lines on the line chart.
    The legend for both (Magnet 1, Magnet 2, etc.) appears as a horizontal line (or lines) of text. Selecting the box, then dragging either handle toward the other forces the labels into a vertical stack, which can then be moved to a visually better position.
    The main functional difference between the two types is in the purpose of the X axis.
    In the scatter chart, both X and Y axes are Value axes—the position of each data point is determined vertically by its Y value and horizontally by its X value.
    The Line chart is a Category chart. Category charts have one Value axis (here the Y axis) and one Category axis (here the X axis). Categories are equally spaced along the Category axis, and the data points' vertical position(in this example) is determined by the Y value of the point.
    In your case, the difference can be seen in the (horizontal) distance between the first two samples in each series compared to the (horizontal) distance between other ajacent pairs in the same series. In the Line chart, these distances are all the same. In the Scatter chart the first pair (74° and 200°) are more widely separated than the others (each 50° higher than the temperature before it).
    In cases where you are trying to show a relationship (or lack of relationship) between two sets of values (speed vs braking distance, temperature vs volume, etc.) a scatter chart usually gives a better representation.
    Practical note: Values must be placed in non-Header rows and columns. Labels, including Category labels, must be placed in Header Rows or Header columns to be picked up by the chart. The formatting of the pasted data in your initial post indicates the temperatures are in a Header column. The column labels are (and should be) in a Header row.
    Good luck with your project!
    Regards,
    Barry
    PS: You might want to check the meanings of "affect" and "effect" before commiting yourself to either on your display and in your report.
    PPS to Yellowbox: HI Ian. Looks like you got started earlier and/or wrote faster thn I did! Something odd happened in the example in your first post. The category labels have been offset one cata set to the right, and there's no 350.
    B

  • CR XI - Problem Setting Line Graph colors in the Chart Expert

    Post Author: desselle
    CA Forum: Charts and Graphs
    Hello,
    I created a Crystal Report (CR) of an existing Trend Analysis report. I have created a VB6 application that calls the .RPT file I created for the report in CR.  The VB6 app sets the report recordset via code that corrsponds to the .TTX file, and the parameters .  The report contains a Line graph that plots five pieces of data.  The report & graph work good.  CR determines the color of each line on the graph.  However, I need to set the color for each line to correspond to the colors used on our existing reports.  The users are accustom to a certain color representing a certain set of data on the existing reports.   I have tried everything I can think of and from all documentation I can find, and nothing changes the line colors.   I have tried all of the following:
    1.) From the Chart Expert, Option tab, I click the Format button next to Color and setup conditional color settings per each piece of data.   However, when I run the report these conditional color settings are not reflected on the CR graph.     I am using formula fields (based off database fields in the recordset) to produce the report.  However, I only see the database fields to use in the conditional color formatting screen and not the formula fields.    I thought this would possibly be the cause why the colors wonu2019t change on the CR, but I canu2019t find a way to make the formula fields show up in the list.
    2.)Also, I tried right clicking the individual lines of the graph and change the selected item color, but this didnu2019t change the color either.  I do this in Design mode and Preview mode and neither one changes the color of the lines on the graph.
    3.)I have also looked into the CR object model to see if I can change the line colors of the graph via code and it doesn't look like I am given this flexibility.
    Do you know what I am doing wrong here?   I just want to be able to set the color of each line on the CR graph to the color I want instead of using the default colors.
    Thanks,Steve

    Post Author: desselle
    CA Forum: Charts and Graphs
    Hello,
    I got the problem fixed w/ the line graph not making the data lines the same color on the report as on the frmPlot graph.   Compare the two screen shots below.   The problem was as follows:  When I created the graph (in the Chart Expert) the field u201CReadingDateu201D was not one of the Report Fields, and all the other fields were Report Fields (Reading, LowAlarm, UpperAlarm, LowerLimit, & UpperLimit). See the 3rd screen shot below.  ReadingDate does show up as a Report Field now but it wasnu2019t at first.   Originally, this field was only available in the Chart Expert as a recordset field.  When I changed this field to be a Report Field, the graph then allowed me to change the data series line colors.   This was not obvious at all.   From the beginning when I setup the graph and passed in the recordset from VB it graphed all of the data series fine.   The colors that the Chart Expert chose for each line just didnu2019t match what was on the frmPlot graph.   Anyway, it is working now.     I can at least say I learned (somethingu2019s to-do and somethingu2019s not to-do) a good bit about Crystal Reports in the process.
    Thanks

  • Problems with Flash Line Graphs

    I have two problems with the new Flash Line Graphs in APEX 3.1
    1. I have created a query that returns a set number of rows. Sometimes the VALUE for a specific row might be null. When this occurs the LABEL data does not show up on the X axis. I want the LABEL data to show up no matter what. How do I accomplish this?
    2. Related to the above query. When the VALUE field is null for 3 records (or more) in a row, not only does the LABEL data for those records not display, the VALUE and LABEL data for the records that appear in the set after these 3 records also do not display. If one or even two null VALUE fields appears in a row, things are still OK. What do I need to do to get all my data to display?
    Any help would be appreciated.
    THANKS
    Raymond

    Raymond,
    For the Interactive report chart issue, could it be related to this?
    Re: Apex 3.1. Interactive Report. Questions and Problems.
    Interactive Report. Chart. Seems to be bug...
    - Christina

  • Problem in setting axis(x and y) in line graph

    Hi All,
    I have a database table student with two column score(number data type) and "no of student"(number data type). With this table I want a jsp line graph which will describe the student table.Score col would be in X axis and the other one in y axis.I am not able to set score in x axis. I am using JDeveloper 10.1.3.3.
    By using scatter graph I am able to set score in x axis and "no of student" in y axis.But my requirement is line graph.So, is there any way to achieve a line graph where score would be in x axis and "no of students" would be in y axis?
    Can any body help me regarding this matter?

    Hi,
    If you are still looking for the solution to this, you can change the graph to display the way you require.
    If you have a graph def file like BIGraphDef1.xml you need to select it in the application navigator. Then in the Structure window select the top level (ex. BIGraph1). This will give you the options available in the property inspector.
    If you change the dataRowShownAsASeries from True to False, you should be able to display your data in the line graph.
    Peter

  • Problem Plotting a Line Graph

    I am trying to plot some line graphs on Numbers and am a new user.
    I can't seem to work out an issue. I want the numbers on the X axis to ascend from 0 onwards from left to right but at the moment they are descending from 10 to 0 left to right.
    How can I change this so the graph is plotted logically?
    Thanks in advance

    There are two basic types of X-Y charts.  All but one are "category" charts where the X axis is evenly spaced and the "numbers" are actually text. The data will be presented in the order listed in your table.  The other is a scatter chart. The icon for this chart looks like a shotgun blast.
    If your X axis numbers are evenly spaced (0,1,2,3...) you can use either type of chart.  Sort your table in ascending order and it will chart as you want it to.
    If your X axis numbers are not evenly spaced (such as 1,2,4,5,10) and you want the chart to be a true X-Y plot of the data, you have to use the scatter chart.  In contrast to the category charts where the X axis values must be in a header column/row, a scatter chart requires the X and Y data to be in data cells. You may have to move your data over a column so the X data is not in a header column.

Maybe you are looking for

  • Questions on notifivation and fonts

    just upgrading to this phone from a blacberry.. 2 questions for now 1. how do I change the font size for text? text is too small for sms/mms,,  compose msg etc... 2. the notification volume won't adjust. I go into settings/sounds/volume. I have the 4

  • TS1424 My iPod wont connect to the iTunes Store when I am about to buy an app what do I do?

    My iPod wont connect to the iTunes Store when I am about to get an app when I go to enter my password it says it can't connect to iTunes Store. What do I do?

  • Serial number report c#

    I am new in teststand. I have create a componant C# using teststand engine. I want to change directory where reports are save in c# and change serial number and name in report with C# command. Is it posible. Can somebody help me please, Regards

  • Absolute Navigation fails in production

    Hi, Wbedynpro Navigation using absolute navigation fucntion module in abap webdynpro is not working in production. But working fine in Q. Any specific setting / authorization required for this navigation feature. Please advice.

  • Solution to clean the Emac monitor!

    Does anyone know any solution to clean the emac monitor best beside the windex or iklear wiper? thanks!