Topic: chart.js - what version is in MDB Pro 4.12?
I'm trying to get a bar chart built with multiple datasets (grouped bars) and the documentation that is available is all pointing to chart.js 2.x. What version is in MDB? Do you have examples of the syntax to build group bars?
Mateusz Łubianka staff answered 5 years ago
Hi @cdenby,
In MDB is 2.7.3 vesrion of Chart.js. If you want to create chart with grouped bars, you should to use datasets. For example:
var data = {
labels: ["zzz", "yyy", "zzz"],
datasets: [
{
label: "Green",
backgroundColor: "green",
data: [8,7,6]
}
{
label: "Blue",
backgroundColor: "blue",
data: [2,3,9]
},
{
label: "Orange",
backgroundColor: "orange",
data: [10,5,7]
}
You can see examples in MDB snippets:
https://mdbootstrap.com/snippets/jquery/pjoter-2-0/1047503 https://mdbootstrap.com/snippets/jquery/marta-szymanska/666684
Best,
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.12.0
- Device: PC
- Browser: Chrome
- OS: W10
- Provided sample code: No
- Provided link: No