%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/var/www/html/ppaobm/vendor/bower-asset/chartjs/src/core/ |
Upload File : |
'use strict'; var helpers = require('../helpers/index'); /** * Namespace to hold static tick generation functions * @namespace Chart.Ticks */ module.exports = { /** * Namespace to hold formatters for different types of ticks * @namespace Chart.Ticks.formatters */ formatters: { /** * Formatter for value labels * @method Chart.Ticks.formatters.values * @param value the value to display * @return {string|string[]} the label to display */ values: function(value) { return helpers.isArray(value) ? value : '' + value; }, /** * Formatter for linear numeric ticks * @method Chart.Ticks.formatters.linear * @param tickValue {number} the value to be formatted * @param index {number} the position of the tickValue parameter in the ticks array * @param ticks {number[]} the list of ticks being converted * @return {string} string representation of the tickValue parameter */ linear: function(tickValue, index, ticks) { // If we have lots of ticks, don't use the ones var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0]; // If we have a number like 2.5 as the delta, figure out how many decimal places we need if (Math.abs(delta) > 1) { if (tickValue !== Math.floor(tickValue)) { // not an integer delta = tickValue - Math.floor(tickValue); } } var logDelta = helpers.log10(Math.abs(delta)); var tickString = ''; if (tickValue !== 0) { var maxTick = Math.max(Math.abs(ticks[0]), Math.abs(ticks[ticks.length - 1])); if (maxTick < 1e-4) { // all ticks are small numbers; use scientific notation var logTick = helpers.log10(Math.abs(tickValue)); tickString = tickValue.toExponential(Math.floor(logTick) - Math.floor(logDelta)); } else { var numDecimal = -1 * Math.floor(logDelta); numDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places tickString = tickValue.toFixed(numDecimal); } } else { tickString = '0'; // never show decimal places for 0 } return tickString; }, logarithmic: function(tickValue, index, ticks) { var remain = tickValue / (Math.pow(10, Math.floor(helpers.log10(tickValue)))); if (tickValue === 0) { return '0'; } else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) { return tickValue.toExponential(); } return ''; } } };