@@ -118,6 +122,16 @@
});
});
+ // For a complete guide to page navigation see the following wiki page
+ // https://github.com/Microsoft/PowerBI-JavaScript/wiki/Handling-Events
+ report.on('dataSelected',
+ function (event) {
+ var data = event.detail;
+ var dataString = JSON.stringify(event.detail);
+ var resultsJSON = JSON.parse(dataString);
+ $("#dataselected-value").val(resultsJSON.dataPoints[0].identity[0].equals + " = " + resultsJSON.dataPoints[0].values[0].formattedValue);
+ });
+
// For a complete guide to page navigation see the following wiki page
// https://github.com/Microsoft/PowerBI-JavaScript/wiki/Page-Navigation
function changePage(direction) {