Tuesday, November 23, 2010

Using Bar Graph (Oracle DVT Component): Part II

This blog is continuation of my previous blog Using Bar Graph (Oracle DVT Component): Part I which showed how could we easily use one of the Data Visualization Tool Bar Graph. I will further try to show the ease with which these component can be used to create a varied graph.

Variation I:

In graph we took the example of Salary versus employees. Lets go ahead and extend the same example to add commission to the graph to show something like:


In the graph above red bar displays the commission too along with this. To achieve we can add one more attribute to the View Object acting as the source for this graph and sql for the vo could look like this:
      Select Ename, Sal, comm from EMP

Now we can either edit the Map binding on the page binding to add the commission attribute (comm in this case) to the Bars column or you can delete the old map and drag and drop the view object from data control as Graph (steps are same as mention in the Part I of this blog except addition of commission attribute as shown below).


Variation II:


In the above graph Salary and commission are shown as two seperate bars we can combine them in one bar as below:


To achieve this just select Stacked Bar as the Graph Type and rest remains the same:



So convenient... right?

No comments:

Post a Comment