drill down in highCharts with visualize.js

0

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: 5 years 2 months ago

if i am commenting

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

vibhu.ranjan - 5 years 2 months ago

1 Answer:

1

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
8974
Joined: Nov 29 2010 - 11:59am
Last seen: 2 years 1 month ago
Feedback