You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Categories
- Business Objects (3)
- Best Practices (2)
- Fusion Charts (5)
- Main (3)
- SQL Server (1)
- SSIS (1)
- Uncategorized (1)
- Universe Design (3)
- Web Intelligence (4)
- Xcelsius (7)
- Design Practices (1)
- Excel (1)
- Tips and Tricks (2)
- Workarounds (1)
Archives
- February 2010
- January 2010
- October 2009
- August 2009
- April 2009
- March 2009
- January 2009
- December 2008
- November 2008
- October 2008
Tag Cloud
auto increment
best practices
bonavista
bulletgraph
Business Objects
charting
charting package
conditional formatting
content management
dashboard
datatable
dianne sawyer
dom
Excel
expand
fannie mae
fix
flash charts
fred carter
frederick carter
free
Fusion Charts
grid component
imt slider
inovista
java
javascript
Java Wrapper
microcharts
pathway technologies
populate dimension table
ripoff
scam
sorting
sparkline
SQL Server
SSIS
table
tree grid
universe
User Access
User Management
Web Intelligence
wrapper
Xcelsius
Latest Tweets
-
Guide on Business Objects access levels posted http://davidlai101.com/blog/2010/02/19/understanding-business-objects-access-levels/ - posted on Feb 19, 2010
-
FusionCharts wrapper 1.0 online guide now available - posted on Feb 03, 2010
-
FusionCharts Java Wrapper 1.0 released
Go to http://davidlai101.com/blog/2010/02/02/fusion-charts-java-wrapper-updated/ to check it out! - posted on Feb 02, 2010
-
The future is in sixth sense technology http://www.youtube.com/watch?v=mzKmGTVmqJs&feature=youtube_gdata - posted on Jan 26, 2010
-
Blog has been upgraded to Wordpress. Enjoy! Http://www.davidlai101.com/blog - posted on Jan 24, 2010


Fusion Charts Wrapper Online Guide
Here’s the online guide to the Fusion Charts Wrapper found at http://davidlai101.com/blog/2010/02/02/fusion-charts-java-wrapper-updated/
If you just need the JavaDocs, please go to http://davidlai101.com/fusioncharts-javadoc/
Steps to build a Fusion Chart in Java
Please ensure that you have example.jsp and example_alternative.jsp open in order to follow the steps below to build a fusion graph.
If you haven’t downloaded the full project file please download it here
Create FusionGraph
First you will want to create a FusionGraph object and set its properties
To create a FusionGraph object you will need to define a Graph Id, Chart Type which is an enum from ChartType and the size of items in each of it’s series. Let’s start with a simple pie graph example that has 5 slices.
Note that the request parameter is required so that we can send the FusionGraph object within jsps.
Next you may want to set the properties of the graph by giving it a customized look. Please refer to the Chart XML API found in http://www.fusioncharts.com/docs for the properties you can customize.
For example if I wanted to set the background of the graph to a gradient of white and yellow I would do this:
You will also want to set the width and height of the graph by using the setWidth(int) and setHeight(int) methods, or just go with the default which is width=600, height=300.

Now to create a series inside the graph:
Series
You will have one or more series containing data.
The series object has a set of member properties that you can set. Please refer to the API for more information.
For the pie graph you will probably want to set the values, and the colors for each pie.

To do this you can use the setColor(int index, String color) and setValue(int index, double value) methods.
ChartFactory
When you are finished creating the graph, you will want to put the graph in a ChartFactory so that the Chart Factory can build the desired xml string for the data. To generate the data for the pie graph, code the following:
A new method called “buildDOMFusionChart(String graphName) was created so that we could utilize the FusionChartsDOM_commented.js which allows us to use an html tag to display the fusion chart.
All you need to do is add the following line instead of “chartFactory.buildFusionChart(“pieGraph”)
You would use on the jsp
You will need to include in your body tag
In addition make sure you have the scripts loaded into your jsp if you are using jsp
Using the helper chartBuilder.jsp
The chartBuilder.jsp has built in Javascript that works with FusionCharts.js and renders the chart for you provided that you provide the correct graph parameter. You can either use this method or the buildDOMFusionChart method which is newer.
All you need to do is provide the graphId of the graph you want to display
For example if I wanted to display the pie graph from the earlier examples, I would do this
Note: You must use example_alternative.jsp to see this

Example.jsp and example_alternative.jsp
Please take a look at the example.jsp attached that will help you build a pie graph using the DOM method. Example_alternative.jsp provides an example of building a chart using the chartBuilder.jsp method. The drawback of using the chartBuilder.jsp method is that you make another server call when calling that jsp. So with pages that have many charts, it will be better using the DOM method.