ESG/wwwroot/BackEnd/assets/javascript/pages/project-overview-demo.min.js

3 lines
1.7 KiB
JavaScript

"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,a){return t&&_defineProperties(e.prototype,t),a&&_defineProperties(e,a),e}var ProjectOverviewDemo=function(){function e(){_classCallCheck(this,e),this.init()}return _createClass(e,[{key:"init",value:function(){this.handleActivityChart(),this.handleInvoicesChart()}},{key:"handleActivityChart",value:function(){var e={labels:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],datasets:[{label:"Time Spent",borderColor:Looper.colors.brand.teal,backgroundColor:Looper.colors.brand.teal,fill:!1,data:[41.3,53.2,68.27,44.17,100.32,83.56,53.04]}]},t=$("#canvas-achievement")[0].getContext("2d");new Chart(t,{type:"bar",data:e,options:{tooltips:{mode:"index",intersect:!0},scales:{xAxes:[{gridLines:{display:!0,drawBorder:!1,drawOnChartArea:!1}}],yAxes:[{gridLines:{display:!0,borderDash:[8,4]},ticks:{beginAtZero:!0}}]}}})}},{key:"handleInvoicesChart",value:function(){var e="dark"===Looper.skin,t=Looper.getColors("gray"),a=e?t[200]:Looper.colors.white,o={type:"doughnut",data:{datasets:[{data:[3150,450,1400],borderColor:[a,a,a],backgroundColor:[Looper.colors.brand.teal,Looper.colors.brand.pink,Looper.getLightColor()],label:"Dataset 1"}],labels:["Balance","Expenses","Not invoiced"]},options:{animation:{animateScale:!0,animateRotate:!0}}},r=$("#canvas-invoices")[0].getContext("2d");new Chart(r,o)}}]),e}();$(document).on("theme:init",function(){new ProjectOverviewDemo});
//# sourceMappingURL=../../sourcemaps/pages/project-overview-demo.min.js.map