drill down in highCharts with visualize.js

I am trying to render the report with highChart in visualize.js but getting the error.

Please find below code and the error:

code:

var reportResource = "/CTIF_Folder/testreport/TestRegion";
 
visualize({
auth : {
name : "superuser",
password : "superuser"
}
}, function(v) {
v("#main").report({
resource : reportResource,
linkOptions : {
beforeRender : function(linkToElemPairs) {
linkToElemPairs.forEach(showCursor);
},
events : {
"click" : function(ev, link) {
if (link.type == "ReportExecution") {
v("#drill-down").report({
resource : link.parameters._report
});
}
console.log(link);
}
}
},
error : function(err) {
alert(err.message);
}
});
function showCursor(pair) {
var el = pair.element;
el.style.cursor = "pointer";
}
});
 
error:
Uncaught TypeError: Cannot read property 'style' of undefined 
vibhu.ranjan's picture
Joined: Jul 14 2014 - 11:54pm
Last seen: 9 years 1 week ago

if i am commenting

el.style.cursor = "pointer"; line then report is coming but drill down is not happing.

vibhu.ranjan - 9 years 1 week ago

1 Answer:

I didn't seem to need the showCursor function to get this working properly...here's my example http://jsfiddle.net/ernestoo/ev1wwsjk/

ernestoo's picture
18958
Joined: Nov 29 2010 - 11:59am
Last seen: 5 years 11 months ago
Feedback