3๐
โ
- Place the javascript library file (such as
Chart.min.js
) inassets/javascripts/
. - In the JSON config for the dashboard(s) which will load the widgets that will rely on the library, add the name of the library to the
layout.customJS
array:
Example:
{
"title": "My Dashboard",
"titleVisible": false,
"description": "a neat dashboard",
"layout": {
"gridSize" : { "columns" : 20, "rows" : 12 },
"customJS" : ["Chart.min.js"],
"widgets" : [
...
]
},
"config": {
...
}
}
Nothing special needs to be done in the Widget. You can just use the library:
var graph = new Chart(ctx).Radar(data);
Source:stackexchange.com