Two line graphs in a single chart

Hello Experts,
I am having set of values each for one line graph.
But I want to plot these two graphs in a single chart.(2 line graphs in a single chart)
Please help me how to plot?
Regards,
Apex User

Hi,
Your query needs to return data in this format:
link    label        value1   value2
null    01-JAN-10    5        6
null    01-FEB-10    3        6
null    01-MAR-10    2        5where 'value1' column will be the first series, 'value2' column will be the second series, etc.
So you SQL query will need to be something like:
select
null link,
created_month label,
sum(value1) value1,
sum(value2) value2
from table
group by
created_monthAmanda

Similar Messages

  • How do I get a two line graph to show all the months in the data table and not just every second one?

    My two line graphs covers six months, but only shows three months How can I make it show all six months

    select the chart, then open the Chart Formatter:
    Then click "Axis", then "Category (X)"
    Change the "Label Angle" to "Left Vertical" or "Right Vertical"

  • BDC recording(updating two line items in a single call)

    Hi,
    I have a problem with the transaction PK31,while recording we enterd material number,plant,supply area in the first screen,after that it display line items for that control cycle,I want to update some fields in that line items,when i updated quantity and status fields in the first line item after that i cliked the change "qty/status button" and it saves that field values and it comes out from the transaction.
    can you please suggest what is the solution for updating two line items in a single call(PK31 transaction).

    Hi,
    In one screen . Put 2 containers with different names.
    cont1,cont2
    on each of the container call grid,grid1 like below .
    1. this is for item line display
    IF g_r_grid IS INITIAL.
          CREATE  OBJECT  g_r_cont
                      EXPORTING  container_name  =  'CONT1'.
        g_r_variant  =  sy-repid.
    *--Build  field  catalog
        PERFORM build_field_catalog.
    *--Layout selection
        g_r_layo-cwidth_opt  = g_c_set.
        g_r_layo-no_rowmark  = g_c_set.
        g_r_layo-sel_mode    = space.
        CALL METHOD g_r_grid->set_table_for_first_display
          EXPORTING
            i_buffer_active = g_c_set
            is_variant      = g_r_variant
            is_layout       = g_r_layo
            i_save          = g_c_set
            i_default       = g_c_set
          CHANGING
            it_outtab       = g_t_alv
            it_fieldcatalog = g_t_fieldcat
            it_sort         = g_t_sort.
      endif
    1. this is for error data display
    IF g_r_grid1 IS INITIAL.
          CREATE  OBJECT  g_r_cont
                      EXPORTING  container_name  =  'CONT2'.
        g_r_variant  =  sy-repid.
    *--Build  field  catalog
        PERFORM build_field_catalog.
    *--Layout selection
        g_r_layo-cwidth_opt  = g_c_set.
        g_r_layo-no_rowmark  = g_c_set.
        g_r_layo-sel_mode    = space.
        CALL METHOD g_r_grid->set_table_for_first_display
          EXPORTING
            i_buffer_active = g_c_set
            is_variant      = g_r_variant
            is_layout       = g_r_layo
            i_save          = g_c_set
            i_default       = g_c_set
          CHANGING
            it_outtab       = g_t_error
            it_fieldcatalog = g_t_fieldcat
            it_sort         = g_t_sort.
      endif

  • CR 9 - Need HELP Setting Line Graph colors in the Chart Expert

    Post Author: desselle
    CA Forum: Charts and Graphs
    Hello,
    I created a Crystal Report (CR) based off 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 corresponds to the .TTX file, and the parameters .  The report contains a Line graph that plots five pieces of data.  The report & graph work good.  The Problem: 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.  Are there some Hot Fixes that I need to apply to my copy of CR?
    Thanks

    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

  • 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

  • How to draw cumulative line graph over the stacked bar chart?(SSRS)

    Hello, 
    I need your help to draw a cumulative line graph over this bar chart. 
    I need your help to draw a cumulative line graph over this bar chart in SSRS.
    The dimension (Category Group) is "Hour" in this case. and expression is sum of two distinct values like 'Y' and 'N' in Activity column(Series Groups). The sum(Activity=Y) in green color and sum(Activity='N') in Red color.
    I require to draw a cumulative line graph in this same chart, that should give the result of cumulative Sum(Activity) for each hour?? I mean sum of (Y+N) for each hour and that should be cumulative over the hour.
    I mean sum of (Y+N) for each hour and that should be cumulative over the hour.
    SSRS Version details:
    Microsoft SQL Server Reporting Services Designers 
    Version 10.50.1600.1
    --Siva

    Hi Siva,
    It seems that you need to verify your email address to post images, etc
    Besides,  Microsoft® SQL Server™ 2008 Reporting Services: Step by Step is a good choice to you. With STEP BY STEP, you work at your own pace through hands-on, learn-by-doing exercises. A companion CD includes data sets and sample code. You can download
    it from this link http://my.safaribooksonline.com/9780735626041 Click the Extras, you can get the samples and database from Supplemental Content.
    And there are vast of valuable articles and SQL Server Reporting Services Books Online in MSDN ,you can click these link to begin your learning journey, SQL Server Reporting Services 2008 Books Online:
    http://msdn.microsoft.com/en-us/library/ms159106(v=SQL.100).aspx 
    Besides these, there are still many valuable videos in Microsoft Webcast, click this link
    https://msevents.microsoft.com/cui/SearchDisplay.aspx?culture=en-US#culture=en-US;eventType=0;sortKey=;sortOrder=;pageEvent=false;hdnInitialCount=;searchcontrol=yes;kwdAny=Reporting%20service to register with a windows live ID, then download the ones you
    want.
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Help please, I need a line graph from a chart with existing data.

    I am trying to put together a form for tracking my weaight loss. I have decided on a format that I like, but I can't figure out how to create a line graph to represent the chart that collects the data. The graph will need to begin with the "start weight" and track all chages throught the 42 cells until the final "net loss."
    Does anyone know how to set this up as a line graph? Your help would be much appreciated, thank you in advance.

    Skipping ahead and assuming I picked the correct direction then i have a possible solution:
    You need to get the weight loss numbers into a single column. If the table of 42 cells is called Table 1 and the table with the start weight is Table 2 and we call our new table Table 5:
    Cell B2 of Table 5 = Table 2::A2
    Cell B3 of Table 5 =B2+OFFSET(Table 1 :: $B$2,MOD(ROW()-3,7),QUOTIENT(ROW()-3,7))
    Fill down with that formula

  • OBIEE Area Chart with Line Graph

    Can you create an Area and Line Graph together in one chart with OBIEE (rather than with the bar graph and line chart combo)??

    Did you mean a Trendline? If that is the case, right click on any of the areas in the area chart and select Trendlines from the context menu.

  • 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

  • The intersection point of two lines in 3D

    How to calculate the intersection point of two lines in 3D?
    source code!

    this is actually a rather easy operation. lets look at some basic properties of lines / vectors in 3D space:
    1. If two lines intersect at a single point, then there must be exactly one plane in which the two lines are co-planar. This is pretty trivial to prove, but I won't bother here, because you can google to find out that two vectors that extend from a common point define a single plane.
    2. If you take the cross-product of two vectors, the resulting vector is guaranteed to be perpendicular to both lines (this is a basic property of a cross-product). If the two lines intersect, then this cross-product will be the normal vector to the plane in which both lines lie.
    3. Now transform (rotate) yours space such that your z-axis becomes parallel to the normal vector of that plane.
    Now, the parametric equation for a line in 3D space is this:
    (x, y, z) = (xo, yo, zo) + k(xd, yd, zd)
    After you have transformed your space, you will notice that the equation of each line will now be
    (x, y, z) = (xo, yo, zo) + k(xd, yd, 0)
    If zo is equal for both lines, then the two lines intersect. Otherwise, the two lines do not intersect.
    if the intersection exists, then to solve for it, you ignore the z coordinate, and treat it like a two dimensional system:
    (x, y) = (xo, yo) + k(xd, yd)
    you can use the basic 2D formula y - yo = m(x - xo), or y = m(x - xo) + yo
    you can calculate m = yd / xd.
    which simplifies to y = mx -mxo + yo, or 0 = mx - y + (yo - mxo)
    you now have two equations of the form Ax + By + C = 0.
    From there, you can use Cramer's rule to find the intersection of the two lines.
    It sounds kind of complicated when you read it as I have presented it, but it's actually extremely easy to write a program for, because each step is simple mathematic operation with basically no decisions involved (hence no if-structures, except at the one point where you actually need to determine if the lines intersect).
    So to reiterate, the steps required are:
    1. Check if lines are parallel. If yes, check if they are the same line, and then stop.
    2. If not parallel, cross-multiply the direction vectors of each line.
    3. Rotate your space such that z is parallel with cross-product of lines
    i. dot-product of z axis (0, 0, 1) with cross-product of lines gives angle*
    ii. cross-product of z axis (0, 0, 1) with cross-product of lines gives axis of rotation.
    iii. rotate your lines (i.e. point and direction vector) about that axis by negative of ange determined in (i).
    4. if z value of points from both lines is the different, no solution. stop.
    5. otherwise, apply Cramer's rule.
    6. done.
    * obtaining the angle of rotation with the dot product relies on the angle being less than 90 degrees, so check if z value of normal vector is + or -, and then perform dot product and cross-product on appropriate + or - z vector.
    - Adam

  • Hao to display two lines in one Graph

    Hi, I want to display two lines in one graph in different color , what should I do? Thanks.

    Hello Carlos,
    the help window for a waveform graph/chart only mentions "single plot
    with waveform datatype". To get more plots on one graph you have to
    build an 2D-array  of  points. Just look at the help window!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Two Graphs in a single screen

    Hi Experts,
    I want to display two graphs in a single screen. It should be a pie chart.
    Currently I did one pie chart using GRAPH_MATRIX_2D.
    It is working fine.
    But i want to display another PIE Chart within the same screen.
    Can anyone help me sort out?
    Thanks in advance

    Hi Vimal,
    Go throungh the following code. it will help you.
    REPORT Z_3DGRAPH.*structure declaration for performance measurementTYPES: BEGIN OF ty_performance,
          company(15) TYPE c,
          q1 TYPE i,
          q2 TYPE i,
          q3 type i,
          q4 type i,
          END OF ty_performance.*structure declaration for options table
    types : BEGIN OF ty_opttable,
            options(30) TYPE c,
            END OF ty_opttable.*Internal table and work area declarations
    DATA: it_performance TYPE STANDARD TABLE OF ty_performance,
          wa_performance TYPE ty_performance.DATA : it_opttable type standard table of ty_opttable,
           wa_opttable type ty_opttable.*initialization event
    INITIALIZATION.*start of selection event
    START-OF-SELECTION.*clearing the work areas
    CLEAR WA_PERFORMANCE.
    CLEAR wa_opttable.*appending values into the performance internal table
    wa_performance-company = 'Company A'.
    wa_performance-q1      = 78.
    wa_performance-q2      = 68.
    wa_performance-q3      = 79.
    wa_performance-q4      = 80.append wa_performance to it_performance.wa_performance-company = 'Company B'.
    wa_performance-q1      = 48.
    wa_performance-q2      = 68.
    wa_performance-q3      = 69.
    wa_performance-q4      = 70.append wa_performance to it_performance.wa_performance-company = 'Company C'.
    wa_performance-q1      = 78.
    wa_performance-q2      = 48.
    wa_performance-q3      = 79.
    wa_performance-q4      = 85.append wa_performance to it_performance.*appending values into the options internal tablewa_opttable-options = 'P3TYPE = TO'.
    APPEND wa_opttable TO it_opttable.wa_opttable-options = 'P2TYPE = VB'.
    APPEND wa_opttable TO it_opttable.wa_opttable-options = 'TISIZE = 1'.
    APPEND wa_opttable TO it_opttable.*calling the graph function module
      CALL FUNCTION 'GRAPH_MATRIX_3D'
        EXPORTING
          col1      = 'Quarter 1'
          col2      = 'Quarter 2'
          col3      = 'Quarter 3'
          col4      = 'Quarter 4'
           dim1      = 'In Percentage%'
          set_focus = 'X'
          titl      = 'Company Performances'
        TABLES
          data      = it_performance
          opts      = it_opttable
        EXCEPTIONS
          others    = 1.
    Regards,
    Rajesh Kumar

  • Line Graph - can I have more than two levels?

    Post Author: Deepa
    CA Forum: Charts and Graphs
    I am working on a line Graph for a client where the client needs the x-axis to show year, then month by Office for expenses. Crystal Reports XI. I can have two levels when I do change of by Transaction month and offices. Is there any way I can have change of Transaction Year, Transaction Month and then Offices? Any help is appreciated. Thank you. Deepa

    Hi,
    Yes,  Disabling the DHCP proxy on WLC and us IP helpers on LAN switch is a option to have more than two DHCP servers.

  • Chart Web Part to not plot zeros on a line graph

    Hi all,
    Is it possible to not plot zeros on a line graph?
    I have a line chart with days of the current month along the x-axis and a value on the y-axis. I have a series representing a forecast as a line that will show what the values along for the whole month should be and a second
    line chart series representing the actual. This tells the reader how the actual is tracking against the forecast. The data is based on an excel table.
    Currently when the latest value is set the line skews back to 0. I don't want this shown, I just want it left blank. On excel you can change the zeros to na() and the line graph will not plot, however, if I leave them as na() in the source data, the whole
    column wont be imported in the chart wizard.
    Any ideas?
    Thanks
    Andy

    It's true -- the RangeBar chart type only has two field options (X and Y) while the RangeColumn correctly has an addtional Y field. The RangeBar chart should obviously have two X fields if it's supposed to plot a range, as the name and example image indicate.
    Neither this thread or the one linked has led to an answer. Can this be fixed?

  • Merging two line charts into 1

    We have two line charts depicting some figures over each week in a year. The line charts project counts on different criterias. We want to have only one chart depicting
    both the lines. Please help us out on this one.
    thanks
    Sameer

    I meant have one criteria (one query).
    so you'd select :
    week of year,
    count(Fixed Bugs),
    count(reported bugs)
    in the same criteria, then select both measures on the 'line' and the week of year on the x axis of the graph?
    Any reason why you cant build them into one criteria?
    BTW are you measures defined the RPD or are you creating them in Answers on the fly using count() function?

Maybe you are looking for