How to create an ADF Bar Chart Programmatically?

 

1. Create an ADF Fusion Web Application

2. Create a JSF page under Web Content

3. In the Backing Bean, create a method which returns data model for Bar Chart. We used Java Hashtable to store series, group and value of BarChart. The return object is CollectionModel.

Note: We can use the same data model  for PieChart 

 

4. Open the JSF page, drop an ADF Bar Chart from ADF Data Visualization into JSF page as shown below

 

122616_0329_Howtocreate1 How to create an ADF Bar Chart Programatically?

 

5. Bar chart will render in JSF page. Modify the Bar as shown below

  • Bind the value attribute to the bean method getBarChartData().
  • Add var attribute
  • Bind the series, value and group to HashTable keys.

 

 

 

 

6. That’s it. The output will be like below

 

122616_0329_Howtocreate2 How to create an ADF Bar Chart Programatically?

 

 

Download the project: ADFChart

govindan How to create an ADF Bar Chart Programatically?
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply šŸ™‚
govindan How to create an ADF Bar Chart Programatically?
Connect me
By | 2016-12-26T23:42:10+00:00 December 25th, 2016|Categories: ADF|Tags: , , , , , |0 Comments
Like us on Facebook.
Connect!