vis.js practice
by srikar7
HTML
<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<!-- Provide the URL to visual/-->
<script src="http://localhost:8081/jasperserver-pro/client/visualize.js"></script>
<div id="main"></div><br>
<div id="main1"></div>
JavaScript
visualize({
server: "http://localhost:8081/jasperserver-pro",
auth: {
name: "superuser",
password: "superuser"
}
}, function(v) {
report = v.report({
resource:"/public/Samples/Reports/AccountList",
container: $('#main'),
success: refreshSelect,
linkOptions: {
beforeRender: function(linkToElemPairs) {
linkToElemPairs.forEach(showCursor);
}
}})
function refreshSelect(data){
console.log(data)}}
);
function showCursor(pair) {
var el = pair.element;
el.style.cursor = "pointer";
}