1(function($) { 2 3 "use strict"; 4 5var randomScalingFactor = function() { 6 return Math.round(Math.random() * 50 * (Math.random() > 0.5 ? 1 : 1)) + 50; 7 }; 8 9 var config = { 10 type: 'line', 11 data: { 12 labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], 13 datasets: [{ 14 label: 'My First dataset', 15 fill: false, 16 borderColor: window.chartColors.red, 17 backgroundColor: window.chartColors.red, 18 data: [ 19 randomScalingFactor(), 20 randomScalingFactor(), 21 randomScalingFactor(), 22 randomScalingFactor(), 23 randomScalingFactor(), 24 randomScalingFactor(), 25 randomScalingFactor() 26 ] 27 }, { 28 label: 'My Second dataset', 29 fill: false, 30 borderColor: window.chartColors.blue, 31 backgroundColor: window.chartColors.blue, 32 data: [ 33 randomScalingFactor(), 34 randomScalingFactor(), 35 randomScalingFactor(), 36 randomScalingFactor(), 37 randomScalingFactor(), 38 randomScalingFactor(), 39 randomScalingFactor() 40 ] 41 }] 42 }, 43 options: { 44 responsive: true, 45 title: { 46 display: true, 47 text: 'Chart.js Line Chart - X-Axis Filter' 48 }, 49 scales: { 50 xAxes: [{ 51 display: true, 52 ticks: { 53 callback: function(dataLabel, index) { 54 // Hide the label of every 2nd dataset. return null to hide the grid line too 55 return index % 2 === 0 ? dataLabel : ''; 56 } 57 } 58 }], 59 yAxes: [{ 60 display: true, 61 beginAtZero: false 62 }] 63 } 64 } 65 }; 66 67 window.ready = function() { 68 var ctx = document.getElementById('canvas').getContext('2d'); 69 window.myLine = new Chart(ctx, config); 70 }; 71 72})(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.