瀏覽代碼

[search] Fixed grid charts defaults

Enrico Berti 10 年之前
父節點
當前提交
f2bb3603cd
共有 1 個文件被更改,包括 14 次插入0 次删除
  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();
     }
   });
+
+  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.fieldsSelected.subscribe(function () {
     vm.search();