Multiple Line Graph

First off, thanks to kglad for the line graph function I
started with, it has been a huge help. Now the step I'm trying to
take is 2 fold.
First, I'd like to graph more than one line segment on the
graph. Right now I am graphing functions f1 and f2, but f2
currently overwrites f1. I want them to coincide so f1 goes from
x=1 to x=15, f2 goes from x=15 to x=25, f3 goes from x=25 to x=10
at a different y (these are all curves), and finally f4 goes from
x=10 to x=1 creating a closed shape. Also, I want the x values and
the y values to be variable based on the temperature. I'm using
PV=nRT and n, R, and T are all known. so I have something like
P=nRT/V where P is y, V is X and the nRT can be calculated for two
steps of the 4. The other two steps are adiabatic, so Q=0, I don't
know yet how to fit the lines but i do know that y = a / (x^(5/3))
is a formula that works, I just need to find the proper a values
for steps 2 and 4.
Part two of this issue is that currently the graph is drawing
as the whole canvas, which is fine for testing until i get the
multiple line part worked out; however I only want this to be 1/4
of the viewing area as I have other movie clips and such to put on
this. A conceptual drawing of what I plan on making can be found
at:
http://www.students.bucknell.edu/gbement/Steps.html
I'm a novice to Actionscript and movie clips, I previously
did everything with motion tweens and nothing was dynamic. I plan
on creating the piston and molecule simulation in another movie
clip, then I can vary the play speed relative to the hot and cold
temperatures by looping the movieclip and having it play faster for
a high T and slower for a low T.
Any help on any of my many issues would be greatly
appreciated and the user will be recognized for their assistance in
my research presentation :)

Hi Arun, thanks again for the help but upon closer inspection
(along with only a basic knowledge of java and actionscript), I
think your script would need editing to work for me (editing i'm
unsure of how to do). What I'm looking for is a graph that will
create a line based on a function. Much like y=(a*b*c)/x or
y=(a*b*c)/(x^1.66) The a*b*c would be complicated also, but here's
what i've thought up on paper that I have to move to script, I hope
this is useful:
Step 1: Calculate the a*b*c
The original function is PV=nRT , nRT being the a*b*c ,
however the Thot and Tcold terms are input boxes that the user
types in before hitting the "go" button.
So I have to do this much:
tcold = Number(tcold_num.text);
thot = Number(thot_num.text);
var n:Number = 1;
var R:Number = 0.0825;
var a:Number;
var b:Number;
var c:Number;
var d:Number;
a = n*R*thot // Step 1 constant
b = // Step 2 constant (formula to be finished :-/) Looks to
be a formula using ((b) / (Math.pow(x, 1.666)))
c = n*R*tcold // Step 3 constant
d = // Step 4 constant (formula to be finished :-/)
Then I need to find a way to initialize axis to line the
graph, I can label the P and V axis using static text boxes later I
suppose.
The problem I have with yours that I don't understand is that
I could add the function into the y part of the addLine() function,
however it's noted as inity= y1 (requires a number), and the
function definition has y1:Number.
Now the issue i'm tackling below is just a newbie's lack of
understanding (i hope), but the script kglad wrote (snipped below)
will graph one line, and i can't figure out for the life of me how
to write this up to graph more than one instance without
overwritting the previous line. Again, Thanks for the help so far,
it has helped me find the points where I lacked direction and solid
ideas before.

Similar Messages

  • Creating multiple Line Graph having common values..

    Hi...
    I've created one application process for creating Multiple Line Graph.
    And i've integreted two tables in this graph, where values may be common for both the tables. In this case, for common values, instead of getting overlapped I'm getting scattered graph(its totally abnormal). Please help me if you 've any idea about this issue.....?
    Please go through the App Process and the output of the SQL query.
    In output of the query, in the NAME column "Feb-2010" is common.
    This is the SQL query OUTPUT:_
    TABLE 1
    NAME VALUE
    Sept-2009 100
    Oct-2009 95
    Nov-2009 98
    Feb-2010 97
    TABLE 2
    NAME VALUE
    Jan-2010 93
    Feb-2010 100
    Mar-2010 98
    Application Process :_
    DECLARE
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    OWA_UTIL.http_header_close;
    HTP.p ('<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>');
    HTP.p ('<anychart>');
    HTP.p ('<settings>');
    HTP.p ('<animation enabled="True"/>');
    HTP.p ('</settings>');
    HTP.p ('<charts>');
    HTP.p ('<chart plot_type="CategorizedVertical">');
    HTP.p ('<data_plot_settings default_series_type="Line">');
    HTP.p ('<line_series>');
    HTP.p ('<marker_settings>');
    HTP.p ('<marker type="None" />');
    HTP.p ('<states>');
    HTP.p ('<hover>');
    HTP.p ('<marker type="Diamond" />');
    HTP.p ('</hover>');
    HTP.p ('</states>');
    HTP.p ('</marker_settings>');
    HTP.p ('<tooltip_settings enabled="True">');
    HTP.p ('<format>Year {%Name}{enabled:false} {%SeriesName} - {%Value}{numDecimals:0}%</format>');
    HTP.p ('</tooltip_settings>');
    HTP.p ('<effects enabled="True">');
    HTP.p ('<drop_shadow enabled="False" />');
    HTP.p ('<bevel enabled="true" distance="1" blur_x="2" blur_y="2" />');
    HTP.p ('</effects>');
    HTP.p ('<line_style>');
    HTP.p ('<line thickness="3" /> ');
    HTP.p ('</line_style>');
    HTP.p ('</line_series>');
    HTP.p ('</data_plot_settings>');
    HTP.p ('<chart_settings>');
    HTP.p ('<title enabled="true">');
    HTP.p ('<text>Avg. %App. Uptime per month </text>');
    HTP.p ('</title>');
    HTP.p ('<axes>');
    HTP.p ('<y_axis>');
    HTP.p ('<title>');
    HTP.p ('<text>Value</text> ');
    HTP.p ('</title>');
    HTP.p ('<scale minimum="90" maximum="101" major_interval="1" />');
    HTP.p ('<labels>');
    HTP.p ('<format>${%Value}{numDecimals:0}</format>');
    HTP.p ('</labels>');
    HTP.p ('<axis_markers>');
    HTP.p ('</axis_markers>');
    HTP.p ('</y_axis>');
    HTP.p ('<x_axis tickmarks_placement="Center">');
    HTP.p ('<title enabled="False" /> ');
    HTP.p ('</x_axis>');
    HTP.p (' </axes>');
    HTP.p ('</chart_settings>');
    HTP.p ('<data>');
    FOR ObjRecord IN (select DISTINCT(K_OBJECT.OBJECT_ID) as OBJECT_ID,name from K_OBJECT, K_OBJ_TYPE_ASP_REL where K_OBJECT.OBJECT_ID=K_OBJ_TYPE_ASP_REL.OBJECT_ID and K_OBJ_TYPE_ASP_REL.OBJECT_TYPE_ID=1)
    LOOP
    HTP.p ('<series name="'|| ObjRecord.name ||'">');
    FOR MonthlyValueRecord IN (select NAME,VALUE
    from K_REPORT_RUN,K_ASPECT_VALUES,K_ASP_TIM_RPT_REL
    where K_REPORT_RUN.RUN_ID=K_ASP_TIM_RPT_REL.RUN_ID
    and
    K_ASPECT_VALUES.ASPECT_VALUE_ID=K_ASP_TIM_RPT_REL.ASPECT_VALUE_ID
    and
    K_ASP_TIM_RPT_REL.ASPECT_ID=1
    and
    K_ASP_TIM_RPT_REL.OBJECT_ID=ObjRecord.OBJECT_ID
    order by K_REPORT_RUN.STARTTIME)
    LOOP
    HTP.p ('<point name="'|| MonthlyValueRecord.name ||'" y="'|| MonthlyValueRecord.value ||'" />');
    END LOOP;
    HTP.p ('</series>');
    END LOOP;
    HTP.p ('</data>');
    HTP.p ('</chart>');
    HTP.p ('</charts>');
    HTP.p ('</anychart>');
    htmldb_application.g_unrecoverable_error := true;
    END;
    Edited by: user12873839 on Apr 9, 2010 3:58 AM
    Edited by: user12873839 on Apr 9, 2010 4:02 AM
    Edited by: user12873839 on Apr 9, 2010 8:00 AM

    >
    Help Needed Urgent.....
    >
    That is one surefire way to not get any help and certainly not urgently. I suggest that you amend the title of your post to something that reflects the actual issue. This will also help anyone with similar issues to find the thread.
    When posting code please put {noformat}{noformat} (with the curly brackets and the word code in lower case) above and below it to preserve formatting like this...
    {noformat}{noformat}
    SELECT *
    FROM emp
    {noformat}{noformat}
    This will be displayed on the forum like this...SELECT *
    FROM emp
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to draw multiple line graph using bi graph in  JHeastart?

    hello,
    i have a problem when displaying a multiple graph in JHeadstart.i had created a graph that represent the report of medical testing.my x-axis is "report date",my y-axis is "observation value" then my series attributes is depend on "item description" .
    One patient has many "item description",each "item description" has one "observation value" and each "item description" has many "report date".
    when the graph was displayed,it only show me in 1 line,then it is depend on the id patient but not like what i set in the graph wizard.actually,it should be display fews line accroding to the "item description".
    then,the "observation value" and "item description" are get from defferent entity object.
    i dun know what was happen.any hits are welcome.
    thanks

    yes,finally i found how to draw it.Actually the series attributes is depend on VO's primary key .
    thanks to who was view my problem.

  • BI Publisher 11g. Plotting multiple lines in a line graph

    Hi,
    We have a requirment where we need to show multiple lines in a line graph. I have gone through the earlier posts for this topic but when I am following the same steps I am not able to resolve the problem.
    I have 3 mterics: Month (which will be X-axis) , Size (Which will be on y-axis) and Name. I have names for 10 tables and i want to display 10 lines in my line graph.
    In the chart generator, I am using Month in "Labels", Table name for "color" field" and size in the "values" section.
    When I am trying this I am geting the following error in chart generator. It says " The data required 2 columns. The data has only 1 column." To trick the system, I also put a dummy column with static value of 1, but then also i am getting the same error, that it requires 2 columns.
    the sample XML for the chart is like this:
    <G_2>
    <TABLE_SIZE_TRENDS>43.90832000000001</TABLE_SIZE_TRENDS>
    <TABLE_NAME>Table1</TABLE_NAME>
    <MONTH_NAME_TRENDS>April</MONTH_NAME_TRENDS>
    </G_2>
    - <G_2>
    <TABLE_SIZE_TRENDS>69.62872</TABLE_SIZE_TRENDS>
    <TABLE_NAME>Table2</TABLE_NAME>
    <MONTH_NAME_TRENDS>April</MONTH_NAME_TRENDS>
    </G_2>
    It looks pretty straightforward but I am stuck in it for quite some time now.
    All your guidance is greatly appreciated in this regard.
    Regards,
    Aakarsh

    any help? still need help. thanks

  • Multiple series on anychart line graph?

    I want to set up an anychart line graph from a query which returns a result set something like:
    PART DATE QTY
    abc 01/01 10
    abc 02/01 20
    abc 03/01 10
    cde 05/01 10
    cde 06/01 20
    So, in the above I want a series for part abc and part cde. I know I can add another series but that has two problems:
    1) The number of distict parts can vary - there might be 2, or might be 20 depending on the parameters used.
    2) Adding a new series means duplicating pretty much the same query manu times (with a restriction on part number) - this is very inefficient!
    Is it possible to add multiple series "programatically"?

    Ah, I never saw the number 10 anywhere.
    You don't need to process the NaN with mathscript. It is sufficient to add the NaN to the data going to the graph terminal. Even if mathscript gets an NaN, you can probably test how it is handled.
    What does the mathscript node actually do? If it is just doing some scaling, it probably will not matter, but if it would do e.g. a linear regression, it would probably give unexpected results.
    LabVIEW Champion . Do more with less code and in less time .

  • Multiple symbols for line graph in illustrator

    I can't figure out how to change the default square data points in a line graph.  When I try to got to Object>Graph>Marker it is greyed out.  When I click on a circle symbol and then try to go to Object>Graph>Design, it is greyed out.  I am so frustrated trying to do the simplest things in this program.  The online tutorials on how to make graphs do not seem to explain the simplest of tasks, only the difficult.  Thanks for any help! 

    Skeptic,
    Yes, it's cumbesome, but it's described in Online Help (at least in CS3 and prior):
    Draw whatever you want to use for the marker. (It can be a Symbol; doesn't matter.)
    Draw a rectangle and send it behind the marker artwork. For a marker on a line chart, the size of the rectangle relative to the marker art defines the scale.So the rectangle can be smaller than the artwork to make the artwork larger, as shown above. The rectangle can be unstroked, unfilled so it doesn't show.
    Select both the artwork and the rectangle. Group. Leave it selected.
    Object>Graph>Design. In the dialog, click New Design. Click OK.
    Black pointer: Select the graph. Object>Graph>Marker. In the dialog, select the Design you just created. Or...
    White pointer: AltClick a single marker in the Graph. AltClick it again to "select up" (Illustrator's upside-down selection scheme) to the parent group. AltClick again to include the legend marker. Object>Graph>Marker. In the dialog, select the Design. This way, you can assign different markers to the various lines in the line graph if you want.
    JET

  • Line Graph with Multiple Series not displayed(Install Missing Plugins)

    Hi All,
    I have created a Graph - Line Graph.
    I have created more then one Series.
    The graph is not being displayed, it asks to download missing plugins.
    Where as when I have a singe chart series the graph is displayed.
    What are the missing plugins, where can I find those.
    I am using Mozilla 5.0.
    Regards
    Arif Khadas

    Please Help!

  • Help with jfree regarding plotting multiple lines in a line graph

    hi,
    i have
    < time>
    < volume>
    i have sucessfully used this data to plot a line graph(1 line)
    now i have
    <time> <time2>
    <volume> <volume2>
    how do i put this values into a single line graph? that means, i will have a line graphs with 2 lines.
    Help appreciated. Thanks Alot

    any help? still need help. thanks

  • Crystal report -How to display multiple lines in line chart?

    Hi,
    M struggling to display multiple lines in line chart. All the values m fetching it from database into data table in below format & data type
    Category(String).....year(Int).....graph_values(Int).....table_value(String)
    Test.........................2006.......... -100............................(100)
    Avg..........................2006..........20................................20
    Median......................2006...........5................................5
    Test..........................2007...........500.............................500
    Avg...........................2007............90..............................90
    Median.......................2007............45..............................45
    M using cross tab to display data and chart to plot line. Following fields I used in Cross tab Expert & Chart expert
    Cross tab expert-
    Rows u2013 category
    Columns u2013 year
    Summarized fields u2013 Min of table_value
    In Chart Expert u2013
    On Change of - Year
    Show values - graph values
    In cross tab m able to see the data properly but not in graph.I have three categories. Hence it should plot three lines in line chart but m able to see only one line for test category.
    FYI u2013 using VS 2008 and crystal report assembly version 10.5
    Urgent. Please reply soon.
    Thanks
    ThakurS

    I got the solution.
    In Chart Expert - I should use
    On Change of -- Year, Category
    Show values -- graph values
    Thanks,
    ThakurS

  • Percentages in 2D line graph

    Hi
    Im having some problems formatting a 2D line graph. The data in the graph is based on a table of dates and corresponding percentages (three percentage colums and one date column). The information is formatted as a percentage in the table but is entered as decimals.
    The graph shows up correctly with the exception of the format of the y, or percentage axis. This show up as a decimal. After trying to format it as a percentage in the drop down menu for the y axis, I can't access "percentage" in this menu. It is greyed out for some reason.
    Any ideas, save for adding a new column and adjusting the data?

    ejm,
    The percentage option that is grayed-out is reserved for the stacked bar chart, I believe. Numbers Charts do not have a formatting feature that converts ratio data to percent. You must do it yourself and then chart the result. I presume that you have a column now that contains ratio data that you have formatted as percent. If you create an auxiliary column that multiplies the original column by 100, you can chart the new column and hide the source data column.
    Jerry

  • How to set the 4th Y axis color for a line graph

    Hello experts,
    I have developed a multiple y axis line graph using oracle reports 10g.
    It has got 1 x axis and 4 axes. I am able to set the color of the the first three y axes
    but the reports designer automatically assigns yellow color to the 4th axis.
    I mean there is no option in the graph wizard for changing the 4th color)
    How to change the color of this 4th y axis to a desired color?
    Cheers
    Sri

    Assuming you mean that your graph has 4 series, not 4 Y axes, you might try something like this:
    1. Save a backup copy of your current report in case the changes you are about to make don't work out and you want to revert to the backup copy.
    2. Using the Property Inspector, display the current value of the Graph Settings property for your graph. The value of the property should be something like:
    <rw:graph id...
    </rw:graph>3. Look for a <SeriesItems> tag and a matching </SeriesItems> tag in the property value. If you don't find them, add the following two lines immediately before the </Graph> tag.
    <SeriesItems>
    </SeriesItems>4. Between the <SeriesItems> tag and the matching </SeriesItems> tag, add (or update) a <Series> tag for each series that you want to specify the color for. For example, to specify the color of the fourth series as red, you would use a <Series> tag like this:
    <Series id="3" color="#ff0000"/>Note that the id numbers start at 0 for the first series, 1 for the second, and so on. The color value is a hexadecimal number specifying the RGB value of the color.
    You can also use the <Series> tag to specify other features like the marker shape.
    For more information on what you can do using the Graph Settings property, see this FAQ and Technical Note.
    Hope this helps.

  • Designing Line Graph

    Hi,
    How to get class file to design a line graph with multiple series and facility to set minimum and maximum values of y-axis. and I need applet code also

    Take a look at: http://www.jfree.org/jfreechart/index.html
    And if you need to do it from a JSP: http://cewolf.sourceforge.net/

  • Use view objects to display muti lines graph

    I need to create multiple lines on a line graph using data from view objects. I did see the demo that allows to add series but the data seems from tabular data.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/index.jspx?_afrLoop=39644483771460039#%2Ffeature%2Fgraph%2Fanimation.jspx%40
    Using Jdev 11.1.1.3
    I understand that each line is a series. I was able to show multiple lines but for supporting data while in reality need to show for different data such as for the stock market lines for Dow, nasdaq, S&P. I used order_lines tables and placed creation_date as x_axis and for lines/y-axis used three columns (product_value, product_id, linesCount)
    Might need to create some complex view or is there a way bind multiple views or view objects can't be used for this case?
    Thanks

    Thanks Shay. What I did was on the right track and is similar what you suggested.
    I was somewhat trying to validate what I did to display multi lines i.e. by placing in the Line field during graph configuration the attributes for each of lines/series.
    If need to display sale total for 5 departments over a year. The view object will have attributes as: sale_date, dept1_sale, dept2_sale, dept3_sale, dept4_sale, dept5_sale
    Then can chart it with sale_date as x-axis and ALL 5 dept sales on line/y-axis.
    By this had the correct structure and was able to generate the 5 lines correctly.
    Thanks

  • Line graph properties

    Hi,
    I got a table like this :
    ID - TIMESTAMP - HISTORY - FUTURE
    1 - 26 jan 2010 - 22 - 0
    1 - 27 jan 2010 - 26 - 0
    1 - 28 jan 2010 - 30 - 0
    1 - 29 jan 2010 - 32 - 32
    1 - 30 jan 2010 - 0 - 35
    1 - 31 jan 2010 - 0 - 39
    1 - 1 feb 2010 - 0 - 43
    I want to create a line graph, but I need a contineous graph with on the X-axis the timestamp,
    and the Y-axis first the History, and then seemlessly followed by the Future values.
    Now I get at 29 jan 2010 a sort of cross in my graphic.
    I mean : the future graph starts plotting at 28 jan and rising until value 32 at 29 jan, and it should stay 0 until 29th jan.
    Is this possible ?
    Edited by: Facehugger on Feb 23, 2010 6:20 AM

    Hi,
    Thanks for the tip.
    Now I get 1 smooth line showing both history and forecast without a 'fade out' in the middle from
    history and a 'fade in' in the middle from forecast.
    This is my query :
    SELECT Measurements.OBJECTID,
    Measurements.TIMESTAMP,
    CASE
    WHEN Measurements.FORECAST =0
    THEN Measurements.HISTORY
    ELSE Measurements.FORECAST
    END
    FROM MEASUREMENTS Measurements
    But ...
    How can I use 2 colors like this example :
    http://www.fraport.com/cms/media/184/184224.forecast_2020.jpg
    blue = history
    green = forecast
    This is also an example of the type of graph I want to create :
    http://www.dft.gov.uk/144130/185507/209573/Road_Traffic_Forecasts.gif
    So multiple lines in different colors, where some of the values are 0 (the first 10 for example).
    Thanks in advance.

  • Line graph repeated values

    Hi,
    i have ploted the line graph which is like this select null,week_ending_date,effort from dual;
    Here the line is ploted but the labels are repeated
    eg:
    if the report is like this
    Weekending_date effort
    12-sep-08 8
    12-sep-08 9
    14-sep-08 10
    15-sep-08 11
    In the x-axis 12-sep-08 is repeated mutilple time based on the effort it is returning but we need the label to be repeated only once not multiple times also from the above example 12-sep-08 has 8,9 as the effort it must plot one obove the other if they are repeated with same label please suggest me how to resolve this
    Thanks
    Sudhir.

    Hi Sudhir,
    try your query like this -
    select null "Link", week_ending_date "Week ending", effort "Effort" from table_name;
    it should work, i m currently using same sort of query for flash chart.
    Hope this will help.
    Thanks,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

Maybe you are looking for