75 lines
1.1 KiB
JavaScript
75 lines
1.1 KiB
JavaScript
|
|
|
|
(function($) {
|
|
/* "use strict" */
|
|
|
|
var dlabChartlist = function(){
|
|
|
|
var screenWidth = $(window).width();
|
|
|
|
var polarChart = function(){
|
|
var ctx = document.getElementById("polarChart").getContext('2d');
|
|
Chart.defaults.global.legend.display = false;
|
|
var myChart = new Chart(ctx, {
|
|
type: 'polarArea',
|
|
data: {
|
|
labels: ["Mon", "Tue", "Wed", "Thu"],
|
|
datasets: [{
|
|
backgroundColor: [
|
|
"#496ecc",
|
|
"#68e365",
|
|
"#ffa755",
|
|
"#c8c8c8"
|
|
],
|
|
data: [40, 35, 30, 20]
|
|
}]
|
|
},
|
|
options: {
|
|
weight: 1,
|
|
cutoutPercentage: 70,
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
scale: {
|
|
scaleShowLine:false,
|
|
display:false,
|
|
pointLabels:{
|
|
fontSize: 0
|
|
},
|
|
},
|
|
tooltips:{
|
|
enabled:false,
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
/* Function ============ */
|
|
return {
|
|
init:function(){
|
|
},
|
|
|
|
|
|
load:function(){
|
|
|
|
polarChart();
|
|
|
|
},
|
|
|
|
resize:function(){
|
|
}
|
|
}
|
|
|
|
}();
|
|
|
|
|
|
|
|
jQuery(window).on('load',function(){
|
|
setTimeout(function(){
|
|
dlabChartlist.load();
|
|
}, 1000);
|
|
|
|
});
|
|
|
|
|
|
|
|
})(jQuery); |