%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/11584/cwd/html/ppaobm/vendor/bower-asset/chartjs/samples/charts/line/ |
Upload File : |
<!doctype html> <html> <head> <title>Line Chart - Cubic interpolation mode</title> <script src="../../../dist/Chart.min.js"></script> <script src="../../utils.js"></script> <style> canvas{ -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } </style> </head> <body> <div style="width:75%;"> <canvas id="canvas"></canvas> </div> <br> <br> <button id="randomizeData">Randomize Data</button> <script> var randomScalingFactor = function() { return Math.round(Math.random() * 100); }; var datapoints = [0, 20, 20, 60, 60, 120, NaN, 180, 120, 125, 105, 110, 170]; var config = { type: 'line', data: { labels: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], datasets: [{ label: 'Cubic interpolation (monotone)', data: datapoints, borderColor: window.chartColors.red, backgroundColor: 'rgba(0, 0, 0, 0)', fill: false, cubicInterpolationMode: 'monotone' }, { label: 'Cubic interpolation (default)', data: datapoints, borderColor: window.chartColors.blue, backgroundColor: 'rgba(0, 0, 0, 0)', fill: false, }, { label: 'Linear interpolation', data: datapoints, borderColor: window.chartColors.green, backgroundColor: 'rgba(0, 0, 0, 0)', fill: false, lineTension: 0 }] }, options: { responsive: true, title: { display: true, text: 'Chart.js Line Chart - Cubic interpolation mode' }, tooltips: { mode: 'index' }, scales: { xAxes: [{ display: true, scaleLabel: { display: true } }], yAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Value' }, ticks: { suggestedMin: -10, suggestedMax: 200, } }] } } }; window.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); window.myLine = new Chart(ctx, config); }; document.getElementById('randomizeData').addEventListener('click', function() { for (var i = 0, len = datapoints.length; i < len; ++i) { datapoints[i] = Math.random() < 0.05 ? NaN : randomScalingFactor(); } window.myLine.update(); }); </script> </body> </html>