Topic: Drill through on Bar Charts
cdenby
pro
asked 5 years ago
When I built a prototype mini-site using charts.js - at the time, 2.5.0 - I was able to create a drill through through the following code:
document.getElementById("cnvTheChart").onclick = function (evt) {
if (theChart.config.type == "bar") {
var activePoints = theChart.getElementAtEvent(evt);
var theElement = theChart.config.data.datasets[activePoints[0]._datasetIndex].data[activePoints[0]._index];
var theDataKeyClicked = theChart.config.data.datakeys[activePoints[0]._index];
HandleChartDrillThrough(theDataKeyClicked);
}
}
But this isn't supported in the MDBootstrap version of chart.js.
What are my options here to get drill through happening on bar charts?
Add comment
Edyta Dabrowska
free
answered 5 years ago
Hello,
charts.js are going to be updated soon. Let me know if you still have this issue after updates.
Regards,
cdenby pro commented 5 years ago
What is the status of the charts.js version being embedded in various versions of MDB? I'm seeing version 1.0.2 in MDB 4.3.2. Can you point me to documentation for the 1.0.2 version of Charts.js so that I can try to build this drill-through?FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No