Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/wirani.co.id/public_html/js/ |
Upload File : |
/* global Chart */ 'use strict'; window.chartColors = { red: 'rgb(255, 99, 132)', orange: 'rgb(255, 159, 64)', yellow: 'rgb(255, 205, 86)', green: 'rgb(26, 188, 156)', blue: 'rgb(54, 162, 235)', purple: 'rgb(153, 102, 255)', grey: 'rgb(201, 203, 207)' }; window.randomScalingFactor = function() { return (Math.random() > 0.5 ? 1.0 : -1.0) * Math.round(Math.random() * 100); }; (function(global) { var Months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; var Samples = global.Samples || (global.Samples = {}); Samples.utils = { // Adapted from http://indiegamr.com/generate-repeatable-random-numbers-in-js/ srand: function(seed) { this._seed = seed; }, rand: function(min, max) { var seed = this._seed; min = min === undefined? 0 : min; max = max === undefined? 1 : max; this._seed = (seed * 9301 + 49297) % 233280; return min + (this._seed / 233280) * (max - min); }, numbers: function(config) { var cfg = config || {}; var min = cfg.min || 0; var max = cfg.max || 1; var from = cfg.from || []; var count = cfg.count || 8; var decimals = cfg.decimals || 8; var continuity = cfg.continuity || 1; var dfactor = Math.pow(10, decimals) || 0; var data = []; var i, value; for (i=0; i<count; ++i) { value = (from[i] || 0) + this.rand(min, max); if (this.rand() <= continuity) { data.push(Math.round(dfactor * value) / dfactor); } else { data.push(null); } } return data; }, labels: function(config) { var cfg = config || {}; var min = cfg.min || 0; var max = cfg.max || 100; var count = cfg.count || 8; var step = (max-min) / count; var decimals = cfg.decimals || 8; var dfactor = Math.pow(10, decimals) || 0; var prefix = cfg.prefix || ''; var values = []; var i; for (i=min; i<max; i+=step) { values.push(prefix + Math.round(dfactor * i) / dfactor); } return values; }, months: function(config) { var cfg = config || {}; var count = cfg.count || 12; var section = cfg.section; var values = []; var i, value; for (i=0; i<count; ++i) { value = Months[Math.ceil(i)%12]; values.push(value.substring(0, section)); } return values; }, transparentize: function(color, opacity) { var alpha = opacity === undefined? 0.5 : 1 - opacity; return Chart.helpers.color(color).alpha(alpha).rgbString(); }, merge: Chart.helpers.configMerge }; Samples.utils.srand(Date.now()); }(this));