This discussion is archived
4 Replies Latest reply: Apr 29, 2013 6:51 AM by AlejandroProfet RSS

DVT BarGraph Bar_Vert_Percent - show absolute values on bar

ckunzmann Newbie
Currently Being Moderated
ADF 11.1.2.0, Graph Bar Percentage

Hi everybody,

is there a posibility to show the absolute value beside the percentage?
I need the graph to show something like "12% \n (235)" and not only "12%".
Sadly there is no such option in the MarkerText-Properties.

Furthermore i would like to show the absolute amount which is represented by the whole bar.
As a workaround I inject the sum into the o1Ticklabel resulting in "Week 12 (555)" on the x-axis.
Any recommendations how to do it better are appreciated.

When there is no way to do it with the ADF graphs im forced to use outputText and position it over the flash-graphs by CSS.

Thanks for noticing.
  • 1. Re: DVT BarGraph Bar_Vert_Percent - show absolute values on bar
    ckunzmann Newbie
    Currently Being Moderated
    Any advice would be appreciated.
    Searching for a solution desperately.
  • 2. Re: DVT BarGraph Bar_Vert_Percent - show absolute values on bar
    ckunzmann Newbie
    Currently Being Moderated
    Is the thread not recognized or is the problem not described well enough?

    Looking for a solution,
    Christian
  • 3. Re: DVT BarGraph Bar_Vert_Percent - show absolute values on bar
    ckunzmann Newbie
    Currently Being Moderated
    Still searching for a way to show absolute values beside the relative ones on percentage bar graphs

    as well as a way to show the sum represented by each bar.

    Is there really no way to do it?
    I can´t believe this usecase to be rare.
  • 4. Re: DVT BarGraph Bar_Vert_Percent - show absolute values on bar
    AlejandroProfet Journeyer
    Currently Being Moderated
    I found this thread while searching for a solution to a similar problem.

    We can reach a workaround by using <dvt:annotation>, see more: http://docs.oracle.com/cd/E24001_01/apirefs.1111/e12418/tagdoc/dvt_annotation.html
    So our page should look like:
    <dvt:barGraph id="barGraph1"
                  value="#{bindings.MyGraphView1.graphModel}"
                  subType="BAR_VERT_CLUST">
      ...
      <dvt:annotationSet>
        <af:forEach begin="0"
                    end="#{bindings.MyGraphView1.estimatedRowCount - 1}"
                    varStatus="vs">
          <dvt:annotation text="#{cf:getValue(bindings.MyGraphView1.graphModel, vs.index, 0)}"
                          series="#{vs.index}"/>
        </af:forEach>
      </dvt:annotationSet>
      ...
    </dvt:barGraph>
    In the page definition:
    <graph IterBinding="MyGraphView1Iterator"
           id="MyGraphView1"
           xmlns="http://xmlns.oracle.com/adfm/dvt" type="BAR_VERT_CLUST">
      <graphDataMap leafOnly="true">
        <series>
          <data>
            <item value="Salary"/>
          </data>
        </series>
        <groups>
          <item value="DepartmentId" label="DepartmentName"/>
        </groups>
      </graphDataMap>
    </graph>
    And this is the code of taglib function cf:getValue:
    public static Object getValue(oracle.adf.view.faces.bi.model.DataModel model, Integer row, Integer col)
      throws oracle.dss.util.RowOutOfRangeException, oracle.dss.util.ColumnOutOfRangeException
    {
      oracle.dss.util.DataAccess da = model.getDataAccess();
      return da.getValue(row, col, oracle.dss.util.DataMap.DATA_VALUE);
    }
    AP

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points