'use strict'; module.exports = function() { // Occupy the global variable of Chart, and create a simple base class var Chart = function(item, config) { this.controller = new Chart.Controller(item, config, this); return this.controller; }; // Globally expose the defaults to allow for user updating/changing Chart.defaults = { global: { responsive: true, responsiveAnimationDuration: 0, maintainAspectRatio: true, events: ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'], hover: { onHover: null, mode: 'nearest', intersect: true, animationDuration: 400 }, onClick: null, defaultColor: 'rgba(0,0,0,0.1)', defaultFontColor: '#666', defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", defaultFontSize: 12, defaultFontStyle: 'normal', showLines: true, // Element defaults defined in element extensions elements: {}, // Legend callback string legendCallback: function(chart) { var text = []; text.push(''); return text.join(''); } } }; Chart.Chart = Chart; return Chart; };