})(),
warn = helpers.warn = function(str) {
//Method for warning of errors
- if (window.console && typeof window.console.warn === "function") console.warn(str);
+ if (console && typeof console.warn === "function") {
+ console.warn(str);
+ }
},
- amd = helpers.amd = (typeof define === 'function' && define.amd),
//-- Math methods
isNumber = helpers.isNumber = function(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
ctx.closePath();
},
color = helpers.color = function(color) {
- if (!window.Color) {
+ if (!root.Color) {
console.log('Color.js not found!');
return color;
}
- return window.Color(color);
+ return root.Color(color);
},
addResizeListener = helpers.addResizeListener = function(node, callback) {
// Hide an iframe before the node
},
};
- if (typeof amd !== 'undefined') {
- define(function() {
- return Chart;
- });
- } else if (typeof module === 'object' && module.exports) {
- module.exports = Chart;
- }
-
root.Chart = Chart;
Chart.noConflict = function() {