TabularData for DVT Stack bar Graph

Dear All,
I used tabulardata to supply value fro my stack bar graph component and I used the code below
public class Stackbar
  public List getTabularData()
    ArrayList list = new ArrayList();
    String[] rowLabels = new String[]
      { "Dry Goods", "Wet Goods", "Misc Goods" };
    String[] colLabels = new String[]
      { "May 2009", "June 2009", "July 2009" };
    Double[][] values = new Double[][]
        { 50000d, 122000d, 175000d },
        { 90000d, 110000d, 150000d },
        { 65000d, 50000d, 95000d }};
    for (int c = 0; c < colLabels.length; c++)
      for (int r = 0; r < rowLabels.length; r++)
        list.add(new Object[]
            { colLabels[c], rowLabels[r], new Double(values[r][c]) });
    return list;
}JSF is simple
<dvt:barGraph id="barGraph1" subType="BAR_VERT_STACK2Y" shortDesc="Sample bar"
                          tabularData="#{viewScope.stackBarBean.tabularData}">
              <dvt:background>
                <dvt:specialEffects/>
              </dvt:background>
              <dvt:graphPlotArea/>
              <dvt:seriesSet>
                <dvt:series/>
              </dvt:seriesSet>
              <dvt:o1Axis/>
              <dvt:y1Axis/>
              <dvt:y2Axis/>
              <dvt:legendArea automaticPlacement="AP_NEVER"/>
            </dvt:barGraph>But I am not able to have a stack bar graph and the data isnt stacking..
Kindly see the image here http://imageshack.us/photo/my-images/831/stackbar.jpg/
My playground code can be downloaded here...
http://code.google.com/p/my-dev-projects/downloads/detail?name=PlayGround.zip&can=2&q=
How do I formulate the tabular data values correctly so that I could achive the correct stack bar graph component
Thanks.
JDEV 11.1.1.6

Well...found the solution myself...
Kindly disregard please..thanks

Similar Messages

  • ADF DVT: Stack Bar Graph unable to display all Bar.

    Hi Experts,
    I'm currently having a problem displaying bar graphs in my Use Case.
    There are unavoidable instance that at some point of the information provided, there may be part that contain a very huge data.
    Below is my sample code.
    In the example code below only the detail with huge data is rendered in the graph. and the rest are not rendered. is this  a known issue?
    screenshot: http://sdrv.ms/13DXeyn.
    I'm using ADF PS6 in windows7(64bit), Chome browser.
    ManagedBean. This bean contains static data for testing only. Notice how big the data in the 2nd to the last detail.
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    import javax.faces.event.AbortProcessingException;
    import oracle.adf.view.faces.bi.component.graph.UIGraph;
    import oracle.adf.view.faces.bi.event.TimeSelectorEvent;
    public class GraphTimeAxisManagedBean {
        SimpleDateFormat stdFormat = new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss");
        public List getTabularData() {
            ArrayList list = new ArrayList();
            try {
              list.add(new Object[] { new Date(stdFormat.parse("2010-06-18-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-06-18-00.00.00").getTime()),"description 1", new Double(20) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-06-18-00.00.00").getTime()),"description 2", new Double(50) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-06-18-00.00.00").getTime()),"description 3", new Double(30) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-07-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-07-01-00.00.00").getTime()),"description 1", new Double(150) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-07-01-00.00.00").getTime()),"description 2", new Double(240) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-07-01-00.00.00").getTime()),"description 3", new Double(10) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-08-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-08-01-00.00.00").getTime()),"description 1", new Double(60) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-08-01-00.00.00").getTime()),"description 2", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-08-01-00.00.00").getTime()),"description 3", new Double(10) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-09-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-09-01-00.00.00").getTime()),"description 1", new Double(90) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-09-01-00.00.00").getTime()),"description 2", new Double(50) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-09-01-00.00.00").getTime()),"description 3", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-10-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-10-01-00.00.00").getTime()),"description 1", new Double(10) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-10-01-00.00.00").getTime()),"description 2", new Double(90) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-10-01-00.00.00").getTime()),"description 3", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-11-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-11-01-00.00.00").getTime()),"description 1", new Double(200) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-11-01-00.00.00").getTime()),"description 2", new Double(20) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-11-01-00.00.00").getTime()),"description 3", new Double(70) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-12-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-12-01-00.00.00").getTime()),"description 1", new Double(60) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-12-01-00.00.00").getTime()),"description 2", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2010-12-01-00.00.00").getTime()),"description 3", new Double(10) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-01-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-01-01-00.00.00").getTime()),"description 1", new Double(90) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-01-01-00.00.00").getTime()),"description 2", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-01-01-00.00.00").getTime()),"description 3", new Double(70) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-02-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-02-01-00.00.00").getTime()),"description 1", new Double(60) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-02-01-00.00.00").getTime()),"description 2", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-02-01-00.00.00").getTime()),"description 3", new Double(30) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-03-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-03-01-00.00.00").getTime()),"description 1", new Double(203)});
              list.add(new Object[] { new Date(stdFormat.parse("2011-03-01-00.00.00").getTime()),"description 2", new Double(90)});
              list.add(new Object[] { new Date(stdFormat.parse("2011-03-01-00.00.00").getTime()),"description 3", new Double(70)});
              list.add(new Object[] { new Date(stdFormat.parse("2011-04-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-04-01-00.00.00").getTime()),"description 1", new Double(75) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-04-01-00.00.00").getTime()),"description 2", new Double(86) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-04-01-00.00.00").getTime()),"description 3", new Double(99) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-05-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-05-01-00.00.00").getTime()),"description 1", new Double(60105) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-05-01-00.00.00").getTime()),"description 2", new Double(50309) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-05-01-00.00.00").getTime()),"description 3", new Double(50210) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-06-01-00.00.00").getTime()),"", new Double(0) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-06-01-00.00.00").getTime()),"description 1", new Double(80) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-06-01-00.00.00").getTime()),"description 2", new Double(77) });
              list.add(new Object[] { new Date(stdFormat.parse("2011-06-01-00.00.00").getTime()),"description 3", new Double(99) });
            } catch (ParseException e) {
            return list;
    JSFF (UI Page).
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:panelGroupLayout id="pgl1">
        <dvt:graph id="barGraph1" graphType="BAR_VERT_STACK" shortDesc="testing"
                   inlineStyle="width:800px; height:300px;"
                   tabularData="#{pageFlowScope.GraphTimeAxisManagedBean.tabularData}">
          <dvt:background>
            <dvt:specialEffects/>
          </dvt:background>
          <dvt:graphPlotArea/>
          <dvt:seriesSet>
            <dvt:series/>
          </dvt:seriesSet>
          <dvt:o1Axis/>
          <dvt:y1Axis/>
          <dvt:legendArea automaticPlacement="AP_NEVER"/>
        </dvt:graph>
      </af:panelGroupLayout>
    </jsp:root>
    Thanks,
    achie

    Achie,
    This is not an issue with the graph as such, but the data issue. Since the value of the data that is being displayed is huge and other datas are relatively very small to occupy the graph area (Ex : 60105 Vs 10).
    You may want to try implementing zoomListener and/or zoomScrollListener for the graph to zoom and see the small datas.
    &amp;lt;dvt:graph&amp;gt;
    -Arun

  • Using stored parameter from data control class with stacked bar-graph

    Hi folks,
    I'm relatively new to ADF & EJB so I want to apologise in advance if this question seems rudimentary to many of you.
    Edit:  I should have mentioned that I'm using JDeveloper 11.1.1.5
    I'm having a hard time determining how to retrieve the value from a variable to be assigned to a property of the bar graph I'm trying to display on my JSF page.
    I have tried to briefly summarise the logic below for reference.
    I have a data control class (ActivityChart) that includes a method "getActivityDetail" returns a List of custom Objects (ActivityDTO) that are the underlying data for my bar graph.
    public class ActivityChart {
        private Double axisScale;
        public ActivityChart() {
            super();
            axisScale = 0.0;
        public List<ActivityDTO> getActivityDetail(List<String> businessUnits) {
            List<ActivityDTO> returnNewList = new ArrayList<ActivityDTO>();
            List<TransactionDTO> dataList = new ArrayList<TransactionDTO>();
            TransactionSessionBean transBean = lookupTransactionSessionBean();
            if (businessUnits != null && !businessUnits.isEmpty()){
                dataList = transBean.getActivityData(SystemUtil.getCurrentUser(), businessUnits);           
                returnNewList = processTransactions(dataList);
                axisScale = calcAxisScale(returnNewList);
            return returnNewList;
    ...The TransactionDTO object is basically a mirror of the entity object to store the fields from the queried db transactions.
    The ActivityDTO object contains a String value (x-axis label) and 3 Double values for the values required for the bar graph.
    What I'm trying to do is dynamically set the scale for the 2 y-axes (I'm using a dual-axis stacked bar graph) because the auto calculated values are not aligned.
    Right now I've got the two relevant elements of the bar graph hard-coded with a specific axis value:
    <dvt:y1Axis axisMaxAutoScaled="false" axisMaxValue="100.0"/>
    <dvt:y2Axis axisMaxAutoScaled="false" axisMaxValue="100.0"/>.
    The value I want to use for the Y-axis is calculated and stored in the "axisScale" variable in the above class.
    Really at a loss of how to move forward from here.
    Would very much appreciate any guidance/direction offered.
    Thanks,
    Karim
    Edited by: 973742 on Nov 28, 2012 8:12 AM

    Looks like I may have found the answer!
    I had to set up the variable in the bindings for the page and then reference the variable from the binding and add the property inputValue.
    ie. value="#{bindings.axisScale.inputValue}"

  • Group Stacked Bar Graph

    Hi,
    In our project we need to implement grouping of stacked bar graph, but with dvt graphs we are not able to achieve this.
    We want similar graph in below link but using dvt graphs:
    http://www.highcharts.com/demo/column-stacked-and-grouped
    Please help me with grouping of stacked bar graphs.
    we are using JDeveloper 11.1.2.3.0 for development.
    Thanks,
    Jasbeer
    Edited by: user13645211 on Jan 8, 2013 11:07 AM

    Hi lo,
    I think all you need to do is implement the code found below. What you need is instead of using the random numbers (like in my example), you would just give it the values for you bar graphs. You can then build an array where you append the values for the second color above the first color by using the add function. If you then go into the plot legend (left click and go into bar plots), you can change the presentation of the data on the graph. You will also have to change the common plots display in the legend as well (left-click and go into common plots). I hope this helps!
    Message Edited by CarlaU on 04-10-2008 09:13 AM
    National Instruments
    Applications Engineer
    Attachments:
    BarStackedGraph.PNG ‏5 KB
    StackedGraph.vi ‏13 KB

  • Single Line and Stacked Bar Graph Representation

    Data to be plotted on graph is as follows
    Year and Month               Study               Planned Subject               Study-Site ID #               # Enrolled          
    2001 / 03          AMXN 9374               50     US-001               1          
    2001 / 04               AMXN 9374               50               FR-101               1          
    2001 / 04               AMXN 9374               50               SP-301               1          
    2001 / 04               AMXN 9374               50               US-001               2          
    2001 / 05               AMXN 9374               50               FR-101               1          
    2001 / 05               AMXN 9374               50               US-001               1          
    2001 / 06               AMXN 9374               50               FR-101               2          
    2001 / 06               AMXN 9374               50               SP-301               2          
    2001 / 06               AMXN 9374               50               US-001               1          
    I want to display the above data in line stacked bar graph format where the
    #Enrolled will be in Stacked Bar by Study -Site ( Y axis)
    Planned Subject should represent a single line at 50 ( Y axis)
    Group by Year and Month ( X- Axis)
    Study excluded ( Study will be selected from dashboard prompt)
    I'm getting the stacked view of Study Site ID correctly but I want Single Line for Planned Subject .
    Currently I'm getting multiple line .
    Eg for 2001/03 I'm getting line at 50 in yellow colour
    for 2001/04 I'm getting a line at 150 in different color since it has 3 Study-Site ID's But the desired output is Single Line at 50
    As per 11g doc this is not possible because there is some upgradation in the nature of the graph
    " Stacked line-bar graphs in which 2 or more measures are shown as lines on the same axis and are not stacked in 10g are stacked in 11g."
    Refer - http://docs.oracle.com/cd/E21764_01/bi.1111/e16452/apndx_ui_chngs.htm
    Is there any workaround for it ?

    Did you found any workaround for it ? I am too looking for same scenerio.

  • Stacked bar graph requirement in OBIEE 11g

    Hi,
    I have stacked bar graph. I want to display units on the middle of each stack. I can display units, but by default these units are displayed on top of each stack. I checked properties of data markers, but I did not get any option to display data in the middle of stack.
    I am using OBIEE 11g.
    Is there any way to accomplish this?
    Thanks.

    We recently logged an Enhancement Request for the same with Oracle: Bug 15928667 : ENH DISPLAY DATA LABELS IN STACKED BAR CHART WITHIN THE BAR GRAPH ITSELF
    There is no way out-of-box to do this as of right now.
    Please assign points if helpful/correct.

  • Stacked Bar Graph with a line plotting count

    Hi everyone
    I am facing a problem with plotting a stacked bar graph with a line or dot for count.
    I have 2 y axes and one x-axes.
    Can anyone help out with suggestions as to how to do this in 9i Reports.
    Thanks
    Neelima

    The graph wizard in Reports 9i allows you to create a dual Y combination graph - is this not sufficient for your needs, or am I missing something?
    Danny

  • I need a stacked bar graph stacked but overlaying data help please

    Hi,
    I have a requirement to change an existing combination graph.
    Currently we use a combination graph that has a bar that shows the usage accross a number of weeks, with a line that shows total available over the top. So the customer can see what they have used in a week against themaximun it could be used in that week.
    Unfortunatley our customer would like this changes to a single bar graph that shows the usage and then if the total available is more than the usage (it is sometimes the same but never less) then this should be added to the bar graph to increase the bar in a different colour.
    I have looked at Reports 10g and the stacked bar graph seems perfect but this adds the two values together and not just the increase. I know i could minus one from the other but with the way my data is structured in the data model this could be a pain as they are linked via a data link in the data model and also seems a bit of a work around. Is there no way to have a overlay on the stacked graph or is there another way to achieve this that i cant see.
    Thanks

    I was able to figure it out.
    Instead of using creating the dataset using:
    CategoryDataset datasetWorkload = DatasetUtilities.createCategoryDataset()
    if a 'DefaultCategoryDataset' is used, the values to be displayed can be customised:
    DefaultCategoryDataset result = new DefaultCategoryDataset();
    result.addValue(200.0, "Allocated", "Jan 04");
    result.addValue(500.0, "Allocated", "Feb 04");
    result.addValue(10.3, "Over-Allocated", "Jan 04");
    result.addValue(16.2, "Over-Allocated", "Feb 04");
    Thanks for your time, users: wpafbuser1 and practissum.

  • Grouped stacked bar graph ?

    Hey,
    does anyone know how to make a grouped stacked bar graph in ADF ?
    Single stacked bar works, but I want multiplestack bar grouped together...
    for an example see : http://www.highcharts.com/demo/column-stacked-and-grouped
    thanks for any help,
    D

    My JDev version is Studio Edition Version 11.1.2.3.0 ( Build JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1 ).
    I have looked into the component and I only found a a grouped bar graph and a stacked bar graph . But I want them combined : group values vertically in one bar and combining several of these bars together in a group.
    See the link I mentioned in my original message.
    Dieter

  • Percentage stacked bar graph in BO dashboards?

    How to create a percentage stacked bar graph in BO dashboards? The graph should be compatible with Mobile/Ipad. I understand this is not available out of box. Looking for workaround solutions only

    Hi vijay,
    As sara said stacked column chart is supported for mobile view. you can validate it in your mobile compatibility property window.
    To turn the normal value into percentage, you can do that in DB level or if your using Bex Query you can calculate in query designer. If not you need to apply the formula in excel level.
    Take a look at my attachment, you will get a better idea. Revert for more clarification if required.
    Happy to help you.

  • Stacked BAR Graph

    Hi Gurus,
       Can somebody give me an idea, how do i use the GRAPH2d/ GRAPH3D function modules, to get a Stacked bar graph?
    I have seen the GRAL transaction for examples, but i don't see any example for Stacked Bar Graph.
    I would appreciate some help in this regard.
    Thanks and Regards,
    Ravi kanth

    Hi Swathi,
    I guess you don't get it in staked bar graph. because how can you identify A, B when C(0-300) is completely overlapped A, B ? use normal bar graph instead.
    Thanks
    Jay.

  • cfchart Can I overlay a none-stacked cfchartseries type="line" over a stacked bar graph?

    Creating the stacked bar graph works well... but I'd like to overlay some non-stacked line-type chartseries over the bars.  I don't appear to be able to do this as the lines just stack on top of one another.
    Any ideas if you can mix stacked bars with non-stacked lines? (CF8)
    Thanks

    The graph wizard in Reports 9i allows you to create a dual Y combination graph - is this not sufficient for your needs, or am I missing something?
    Danny

  • Dual Y stacked bar graph - how to force both y scales to be the same size

    Hi,
    I use dual y stacked bar graph to show values side by side. Since one value is smaller, Y scales have different max values. How can I fore them to be the same?

    Hello,
    OK. This means you need automatic scale for the y axis.
    BTW: Why do you need dual y axis if they should have the same scale?
    The common use case for dual y axis is to show two series with different units and/or scale.
    regards
    Peter

  • Y axis max ignored for horizontal stacked bar chart (SVG)

    G'day,
    I'm using the standard SVG horizontal stacked bar chart (multi-series). I have set the Y axis maximum value but it is ignored - bars are plotted to their maximum height.
    I've had no such problem with vertical stacked bar charts.
    We're running v2.2.0.00.32.
    Is this a known bug?
    Regards,
    Chris.

    I don't understand why you are soying it is not possible.
    Actually I think it is and quite easily but maybe i missunderstand the question.
    But anyway, here is what I would do:
    In the spreadsheet, you can calculate the percentage of each status per project:
         Completed     Pending     Partially completed     Not Started
    Project 1     78.10%     6.46%     10.51%     4.93%
    Project 2     51.01%     2.62%     39.21%     7.15%
    And then select these data for the stacked bar chart. Here you get the graph you are looking for.
    Oli

  • Stacked Bar graph in ABAP

    Hi,
    Can I create a Stacked Bar graph using ABAP Function Modules?
    If yes, can anybody please explain how with any suitable example. I also need different colors in each bar of the graph.
    Any help would be appreciated.
    Thanks.

    [Displaying 3D Graphs in ABAP |http://wiki.sdn.sap.com/wiki/display/ABAP/Displaying3DGraphsinABAP]

Maybe you are looking for