O'Reilly logo

FusionCharts by Shamasis Bhattacharya, Pallav Nadhani, Sanket Nadhani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating a chart in Java using data from an array

  1. Create a new JSP file ArrayExample.jsp in the project.
  2. Type the following code in it:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc"%> <html> <head> <title>Creating a chart in Java from an array</title> <script type="text/javascript" src="Charts/FusionCharts.js"></script> </head> <body> <% String[][] arrData = new String [3][3]; arrData[0][0] = "2009"; arrData[1][0] = "2010"; arrData[2][0] = "2011"; arrData[0][1] = "892500"; arrData[1][1] = "815300"; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required