]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Time Scale now requires and warns for Moment.js dep
authorTanner Linsley <tannerlinsley@gmail.com>
Mon, 28 Sep 2015 17:27:47 +0000 (11:27 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Mon, 28 Sep 2015 17:27:47 +0000 (11:27 -0600)
src/scales/scale.time.js

index 58984b3c44545548b1bb5d2ed1e9e0b7d0dabc09..e885b9ee9f863c21f43078f57c230dd847623d8c 100644 (file)
@@ -1,6 +1,11 @@
 (function() {
        "use strict";
 
+       if (!window.moment) {
+               console.warn('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at http://momentjs.com/');
+               return;
+       }
+
        var root = this,
                Chart = root.Chart,
                helpers = Chart.helpers;