|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Getting error “dojo is undefined”.....!Hi,
I have a JSP to display a pie chart using Dojo. I got the code for the same from the net. After using it I am getting the error while running it, error is “dojo is undefined”. As I am new to dojo and I have no idea about this error, I tried a lot to solve it but I couldn’t get the solution. So could anyone one of you please help me. Thanks in advance. Here with this I am attaching the code which I am using and I have heighted the lines for which I am getting error. Your help would be very much appreciated as I am near to the dead line given to me to finish this task. ERROR+doc.docx <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Assets and Liabilities Allocation View</title> <style type="text/css/js"> @import "pathtodojo/dijit/themes/nihilo/nihilo.css"; </style> </head> <script type="text/javascript"> var djConfig = { isDebug:false, parseOnLoad:true }; </script> <script type="text/javascript" src="/Chart/WebContent/dojo/dojo.js"></script> <script type="text/javascript" src="/Chart/WebContent/dojox/charting/Chart2D.js"></script> <script type="text/javascript" src="/Chart/WebContent/dojox/charting/Theme.js"></script> <script type="text/javascript" src="/Chart/WebContent/dojox/charting/widget/Legend.js"></script> <script type="text/javascript" src="/Chart/WebContent/dojox/charting/plot2d/Pie.js"></script> <script type="text/javascript" src="/Chart/WebContent/dojox/charting/themes/MiamiNice.js"></script> <script type="text/javascript" src="/Chart/WebContent/dojox/charting/widget/Chart2D.js"></script> <script type="text/javascript" language="Javascript"> dojo.require("dojox.charting.Chart2D"); dojo.require("dojox.charting.widget.Chart2D"); dojo.require("dojox.charting.plot2d.Pie"); dojo.require("dojox.charting.themes.MiamiNice"); dojo.require("dojox.charting.widget.Legend"); dojo.addOnLoad(function(){ var dc = dojox.charting; var chartTwo = new dc.Chart2D("chartTwo"); chartTwo.setTheme(dc.themes.MiamiNice) .addPlot("default", { type: "Pie", font: "normal normal 11pt Tahoma", fontColor: "black", labelOffset: -30, radius: 80 }).addSeries("Series A", [ {y: 4, text: "Equity", color: "red"}, {y: 3, text: "Fixed Income ", color: "green"}, {y: 2, text:"Cash & CE", color: "blue"}, {y: 1, text: "Others", color: "yellow"} ]); chartTwo.render(); var legendTwo = new dojox.charting.widget.Legend({chart: chartTwo}, "legendTwo"); var ec = dojox.charting; var chartThree = new ec.Chart2D("chartThree"); chartThree.setTheme(ec.themes.MiamiNice) .addPlot("default", { type: "Pie", font: "normal normal 11pt Tahoma", fontColor: "black", labelOffset: -30, radius: 80 }).addSeries("Series A", [ {y: 4, text: "Home Equity", color: "red"}, {y: 3, text: "Credit Cards ", color: "green"}, {y: 2, text:"Others", color: "blue"} ]); chartThree.render(); var legendThree = new dojox.charting.widget.Legend({chart: chartThree}, "legendThree"); }); </script> <body class="nihilo"> <table> <tr> <td> <div id="chartTwo" style="width: 500px; height: 300px;"></div> </td> <td> <div id="chartThree" style="width: 400px; height: 300px;"></div> </td> </tr> <tr> <td> <div id="legendTwo"></div> </td> <td> <div id="legendThree"></div> </td> </tr> </table> </body> </html> |
| Free embeddable forum powered by Nabble | Forum Help |