Charting using Janus Web Server and FusionCharts Free
You've created a beautiful web site, but the only thing missing is a way to easily add bar graphs, pie charts, or other business graphics. Fortunately, there is an easy way to do this at little or no cost using FusionCharts Free from InfoSoft Global Ltd. FusionCharts Free supports a generous number of business charts. Of course, for more sophisticated options, there is a more full featured version, for which you must pay a license fee.
This tutorial should not be construed as an endorsement of FusionCharts Free or InfoSoft Global Ltd.. It is presented only as an example of how one can easily add business charts to Janus Web Server applications.
Chart Types Supported
FusionCharts Free supports the following chart types:
- Bar Charts (2D and 3D)
- Pie Charts (2D and 3D)
- Doughnut Charts
- Line Charts
- Area Charts
- Stacked Charts
- Combination (Line & Bar) Charts
- Candlestick Charts
- Funnel Charts
- Gantt Charts
Hint: When you upload the files to your Janus Web procedure file, upload them as binary files to avoid the dreaded "Code Page" issue. You must then add a Janus Web rule to send them to the browser as "binary". The data that will populate your chart will come from an XML file that is either created by another program specified by a URL, or that is coded directly in the charting program.
Using FusionCharts Free with Janus Web
In the <head> section of your HTML file you will need to include the following:
You may need to modify the path name depending on your Janus Web rules.
You then add the following code in the <body> section of the HTML:
<graph caption='Pie Chart' decimalPrecision='0' showPercentageValues='0' showNames='1' numberPrefix='$' showValues='1' showPercentageInLabel='0' pieYScale='45' pieBorderAlpha='100' pieRadius='100' animation='0' shadowXShift='4' shadowYShift='4' shadowAlpha='40' pieFillAlpha='95' pieBorderColor='FFFFFF'> <set value='25' name='Item A' color='AFD8F8'/> <set value='17' name='Item B' color='F6BD0F'/> <set value='23' name='Item C' color='8BBA00' isSliced='1'/> <set value='65' name='Item D' color='A66EDD'/> <set value='22' name='Item E' color='F984A1'/> </graph>
- There is a problem with your Janus Web rules. Check SirScan, and look for Janus Web rule problems.
- There is a problem with the DataURL program or Janus Web rules.
- Your XML data is not in the proper format or is not well-formed.
You can add even more punch to your FusionCharts data: you can add a drill-down capability by adding a URL to the XML data for a particular Bar or Slice of a chart. You would need to add the
link property to the
set value for a bar or slice.
<set name='Jan' value='17400' link='n-DemoLinkPages/DemoLink1.html' color='AFD8F8' />
n- prefix to the link indicates that it is to open in a new window. Leave this off if you want to replace the active page.