MediaWiki:Wikia.js

importScriptPage("MediaWiki:Chart.js", "dev"); setTimeout(function {       clearInterval(interval);    }, 30000); function startCharts { var ctx = document.getElementById('myChart'); var ctx2 = document.createElement('canvas'); ctx.appendChild(ctx2).getContext('2d'); ctx = ctx2.getContext('2d');
 * (function( $, mw, Chart ) {

var chart = new window.Chart(ctx, {           // The type of chart we want to create            type: 'line',           // The data for our dataset            data: {                labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],                datasets: [{                    label: 'My First dataset',                    backgroundColor: 'rgb(255, 99, 132)',                    borderColor: 'rgb(255, 99, 132)',                    data: [0, 10, 5, 2, 20, 30, 45]                }]            },

// Configuration options go here options: {} });   }    interval = setInterval(function { if (window.Chart && $("#myChart").length) { startCharts; clearInterval(interval); }   }, 500); })(jQuery, mediaWiki, window.Chart);