Java Plugin for FusionCharts

Add interactive charts to your application using JSP charts plugin for FusionCharts

Most of the JSP charting libraries available in the market use server-side code to generate static images of charts and gauges. But why stick to static images when you can have interactive charts? You can use this JSP Charts plugin along with our core library to build interactive graphs and charts for your applications. You can choose from any of the 90+ charts and 1000+ maps and add them to your application using JSP code.

Features

  • Enjoy support for basic FusionCharts features like annotations, macros, themes, image-export, and more.
  • Execute projects without writing separate API for your JavaScript application.
  • SQL or NoSQL, connect your chart directly to database of your choice.
  • Add data in multiple ways, JSON or XML.

Quick Demo

Simple chart
Quick demo

Quick Start

Step 1 : Install the FusionCharts Java Plugin

  • Download the FusionCharts library
  • Unzip the archive and move to fusioncharts-suite-xt > integrations > java > fusioncharts-wrapper to get the fusioncharts.java file.
  • Start using the methods and classes available under the FusionCharts namespace to generate charts in your project.

Step 2 : Include FusionCharts JavaScript library in your page

<script type="text/javascript" src="/path/to/fusioncharts.js"></script>

Step 3 : Include the plugin source file (FusionCharts.java) in your project

<%@page import="FusionCharts" %>

Step 4 : Render your chart

Create a chart object that consists of the information required to render the chart.

<%
    FusionCharts area2dChart = new FusionCharts(
        "Area2D",// chartType
        "myFirstChart",// chartId
        "600","400",// chartWidth, chartHeight
        "chart",// chartContainer
        "json",// dataFormat
        "{\"chart\":{\"caption\":\"Harry\\'sSuperMart\",\"subCaption\":\"Top 5 stores in last month by revenue\",\"numberPrefix\":\"$\",\"theme\":\"ocean\"},\"data\":[{\"label\":\"Bakersfield Central\",\"value\":\"880000\"},{\"label\":\"Garden Grooveharbour\",\"value\":\"730000\"},{\"label\":\"Los Angeles Topanga\",\"value\":\"590000\"},{\"label\":\"Compton-Rancho Dom\",\"value\":\"520000\"},{\"label\":\"Daly City Serramonte\",\"value\":\"330000\"}]}"
);
%>

Render the chart

<%=area2dChart.render()%>

Licensing

FusionCharts Java plugin is open-source and distributed under the terms of the MIT/X11 License. You will still need to download and include FusionCharts in your page. This project provides no direct functionality. You can download a free evaluation version. However, You will need to purchase a FusionCharts license to use in a commercial environment (FusionCharts is free for non-commercial and personal use).