Browse Source

[search] Fixed grid charts defaults

Enrico Berti 10 years ago
parent
commit
f2bb3603cd
1 changed files with 14 additions and 0 deletions
  1. 14 0
      apps/search/src/search/static/search/js/search.ko.js

+ 14 - 0
apps/search/src/search/static/search/js/search.ko.js

@@ -483,6 +483,20 @@ var Collection = function (vm, collection) {
       vm.search();
       vm.search();
     }
     }
   });
   });
+
+  collection.template.chartSettings = $.extend({
+    chartType: 'bars',
+    chartSorting: 'none',
+    chartScatterGroup: null,
+    chartScatterSize: null,
+    chartScope: 'world',
+    chartX: null,
+    chartYSingle: null,
+    chartYMulti: [],
+    chartData: [],
+    chartMapLabel: null
+  }, collection.template.chartSettings);
+
   self.template = ko.mapping.fromJS(collection.template);
   self.template = ko.mapping.fromJS(collection.template);
   self.template.fieldsSelected.subscribe(function () {
   self.template.fieldsSelected.subscribe(function () {
     vm.search();
     vm.search();