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 drill-down chart in Java using data from MySQL

  1. In AnnualRevenues.jsp, modify this line of code:
    strXML += "<set label = '"+year+"' value = '"+total+"' link = 'Quarterly.jsp?year="+year+"'/>";
    
  2. And this line as well:
    String strXML = "<chart caption='Annual Revenue - last 3 years' subcaption='Click on a column to view revenue for each quarter for that year' numberPrefix='$'>";
    
  3. Add another file to this project and name it as Quarterly.jsp.
  4. Paste 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" ...

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