diff --git a/Gruntfile.js b/Gruntfile.js index f79e9567e..6c30bc28e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -181,6 +181,7 @@ module.exports = function(grunt) { "d3.js": "d3/d3.js", "underscore.js": "underscore/underscore.js", "jquery.js": "jquery/dist/jquery.js", + "modernizer.js": "modernizer/modernizr.js", "js-schema.js": "js-schema/js-schema.debug.js", "es5-shim.js": "es5-shim/es5-shim.js" } diff --git a/bower.json b/bower.json index 78c8d0eb8..4d81b8d8e 100644 --- a/bower.json +++ b/bower.json @@ -24,6 +24,7 @@ }, "devDependencies": { "jquery": "2.1.1", + "modernizer": "2.8.2", "js-schema": "0.7.0", "es5-shim": "latest" } diff --git a/config/karma.conf.js b/config/karma.conf.js index 799219119..281ec0e96 100644 --- a/config/karma.conf.js +++ b/config/karma.conf.js @@ -18,7 +18,8 @@ module.exports = function (config) { //'build/tauCharts.js', {pattern: 'test/utils/*.js', included: false}, {pattern: 'css/tooltip.css', included: true}, - {pattern: 'libs/**/*.js', included: false}, + {pattern: 'css/layout.css', included: true}, + {pattern: 'libs/**', included: false}, {pattern: 'node_modules/chai/*.js', included: false}, {pattern: 'tau_modules/**/*.js', included: false}, {pattern: 'test/*test.js', included: false}, diff --git a/plugins/legend.js b/plugins/legend.js index 1fe603fb6..ebdeef8a5 100644 --- a/plugins/legend.js +++ b/plugins/legend.js @@ -44,10 +44,11 @@ var color = this._unit.options.color; var colorDimension = color.dimension; var data = chart.getData(); - var groups = _.groupBy(data, function (item) { + var keys = _.map(data, function (item) { return item[colorDimension]; }); - return _.keys(groups).reduce(function (colorMap, item) { + // debugger + return _.unique(keys).reduce(function (colorMap, item) { colorMap[item] = color.get(item); return colorMap; }, {}); diff --git a/prototype/dsl.html b/prototype/dsl.html index b0ca1f30e..662fb8567 100644 --- a/prototype/dsl.html +++ b/prototype/dsl.html @@ -17,7 +17,8 @@ - + + @@ -100,63 +101,51 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+