RAD 7.0
Dojo 1.0 Charts worked on Portal 6.0, RAD 7.0
Posted November 16th, 2007 by ravalkshitijI am trying to develop Bar Chart and Bubble Chart using Dojo 1.0 Chart on WebSphere Portal Server 6.0 and RAD 7.0. For a simple web application this has been done, but for a portlet I am facing problems. It would be great if somone can help me on this. Here are the details of my code for trying to implement dojox.charting.Chart2D.
dojo.require("dojox.charting.Chart2D");
makeObjects = function(){
var chart1 = new dojox.charting.Chart2D("test1");
alert("chart1:" + chart1);
chart1.addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true});
chart1.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", includeZero: true});
chart1.addPlot("default", {type: "ClusteredColumns", gap: 2});
chart1.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
chart1.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
chart1.render();
};
dojo.addOnLoad(makeObjects);
(1) With this code what I am getting is a blank page! I tried IE, Firefox and Safari browsers.
Instead of I also tried writing this to another JSP and including it like:
(2) With I am getting a Java Script error:
'dojo' is undefined for the code dojo.require("dojox.charting.Chart2D");
I am unable to make out whether this is a dojo loading problem, or some rendering problem. It would be great if somebody can help me out.
Dojo 1.0 Bubble Chart and Bar Chart worked on Portal 6.0 on RAD 7.0
Posted November 15th, 2007 by ravalkshitij(1)
I am facing problem implementing Chart2D with Dojo 1.0 on Websphere Portal (portlet) 6.0. I am getting a strange JavaScript error:
currentStyle is null
Strange enough, I have not used any JavaScript var called currentStyle. I am unable to understand how I am getting this error. I tried on both IE and Mozilla Firefox. On IE I am getting this JavaScript error and on Mozilla Firefox the page is blank, does not say anything!
(2)
Secondly, I have to implement a bubble chart. Does anyone have any idea how I can do this?
Dojo Forum