dtable-statistic 4.0.2-test-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/es/api/dtable-db-api.js +43 -0
- package/es/assets/css/color-picker.css +53 -0
- package/es/assets/css/color-rules-popover.css +144 -0
- package/es/assets/css/color-theme-dialog.css +40 -0
- package/es/assets/css/dashboard.css +562 -0
- package/es/assets/css/dialog.css +415 -0
- package/es/assets/css/mobile-dashboard.module.css +91 -0
- package/es/assets/css/slider.css +77 -0
- package/es/assets/css/statistic-chart.module.css +11 -0
- package/es/assets/css/statistic-custom-title.module.css +3 -0
- package/es/assets/css/statistic-custom.module.css +4 -0
- package/es/assets/css/statistic-numeric-column-item.module.css +43 -0
- package/es/assets/css/statistic-time-picker.module.css +21 -0
- package/es/assets/css/theme.css +61 -0
- package/es/assets/images/icon.png +0 -0
- package/es/calculator/base-calculator.js +111 -0
- package/es/calculator/basic-chart-calculator.js +571 -0
- package/es/calculator/combination-calculator.js +296 -0
- package/es/calculator/compare-bar-calculator.js +291 -0
- package/es/calculator/completeness-calculator.js +307 -0
- package/es/calculator/copy-value.js +47 -0
- package/es/calculator/dashboard-calculator.js +146 -0
- package/es/calculator/heat-map-calculator.js +225 -0
- package/es/calculator/horizontal-bar-calculator.js +100 -0
- package/es/calculator/index.js +88 -0
- package/es/calculator/map-calculator.js +169 -0
- package/es/calculator/mirror-calculator.js +217 -0
- package/es/calculator/number-card-calculator.js +135 -0
- package/es/calculator/pivot-table-calculator.js +810 -0
- package/es/calculator/scatter-calculator.js +150 -0
- package/es/calculator/thread-manager.js +70 -0
- package/es/calculator/trend-calculator.js +204 -0
- package/es/calculator/workers/basic-chart-calculator-worker.js +410 -0
- package/es/calculator/workers/calculator.worker.js +22 -0
- package/es/calculator/workers/card-calculator-worker.js +28 -0
- package/es/calculator/workers/combination-calculator-worker.js +257 -0
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +149 -0
- package/es/calculator/workers/completeness-calculator-worker.js +153 -0
- package/es/calculator/workers/dashboard-calculator-worker.js +56 -0
- package/es/calculator/workers/mirror-calculator-worker.js +132 -0
- package/es/calculator/workers/pivot-table-calculator-worker.js +615 -0
- package/es/calculator/workers/scatter-calculator-worker.js +67 -0
- package/es/calculator/workers/trend-calculator-worker.js +93 -0
- package/es/calculator/world-map-calculator.js +193 -0
- package/es/components/common-add-tool.js +19 -0
- package/es/components/dialog/chart-addition-edit-dialog.js +89 -0
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +261 -0
- package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +74 -0
- package/es/components/dialog/color-theme-dialog.js +71 -0
- package/es/components/dialog/enlarged-chart-dialog.js +73 -0
- package/es/components/dialog/new-table-dialog.js +113 -0
- package/es/components/dialog/new-view-dialog.js +87 -0
- package/es/components/dialog/rename-view-dialog.js +87 -0
- package/es/components/dialog/statistic-record-dialog/index.css +114 -0
- package/es/components/dialog/statistic-record-dialog/index.js +174 -0
- package/es/components/dialog/table-select-dialog.js +93 -0
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +94 -0
- package/es/components/dtable-popover.js +109 -0
- package/es/components/dtable-search-input.js +137 -0
- package/es/components/dtable-select.js +104 -0
- package/es/components/index.js +11 -0
- package/es/components/loading.js +8 -0
- package/es/components/modal-portal.js +36 -0
- package/es/components/popover/color-rules/color-rule.js +179 -0
- package/es/components/popover/color-rules/index.js +87 -0
- package/es/components/popover/color-rules/rule-filters/filter.js +214 -0
- package/es/components/popover/color-rules/rule-filters/index.css +214 -0
- package/es/components/popover/color-rules/rule-filters/index.js +97 -0
- package/es/components/popover/color-rules/rule-filters/number-input.js +85 -0
- package/es/components/popover/color-rules-popover.js +213 -0
- package/es/components/popover/color-selector-popover.js +85 -0
- package/es/components/seatable-radio/index.css +51 -0
- package/es/components/seatable-radio/index.js +28 -0
- package/es/components/select/index.js +2 -0
- package/es/components/select/option-group.css +104 -0
- package/es/components/select/option-group.js +225 -0
- package/es/components/select/option.js +51 -0
- package/es/components/select/select.css +211 -0
- package/es/components/select/select.js +157 -0
- package/es/components/toast/alert.js +130 -0
- package/es/components/toast/index.js +3 -0
- package/es/components/toast/toast.js +164 -0
- package/es/components/toast/toastManager.js +150 -0
- package/es/components/toast/toaster.js +64 -0
- package/es/constants/color-rules.js +8 -0
- package/es/constants/dtable-select-style.js +61 -0
- package/es/constants/event-types.js +1 -0
- package/es/constants/index.js +501 -0
- package/es/constants/key-codes.js +102 -0
- package/es/constants/zIndexes.js +1 -0
- package/es/custom-g2.js +614 -0
- package/es/dashboard.js +408 -0
- package/es/desktop-dashboard.js +299 -0
- package/es/index.js +33 -0
- package/es/locale/index.js +17 -0
- package/es/locale/lang/de.js +237 -0
- package/es/locale/lang/en.js +237 -0
- package/es/locale/lang/fr.js +237 -0
- package/es/locale/lang/zh_CN.js +237 -0
- package/es/mobile-dashboard.js +103 -0
- package/es/model/collaborators.js +11 -0
- package/es/model/stat-item.js +340 -0
- package/es/model/statistic-dashboard.js +8 -0
- package/es/service/chart-service.js +192 -0
- package/es/service/dashboard-service.js +415 -0
- package/es/stat-editor/chart-name-editor.js +75 -0
- package/es/stat-editor/index.js +74 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +149 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +415 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +193 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +13 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +107 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +332 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +170 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +141 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +219 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +89 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +132 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +319 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +138 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +135 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +156 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +147 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +195 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +126 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +169 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +352 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +145 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +153 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +466 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +183 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +542 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +111 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +86 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +169 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +273 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +105 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +243 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +65 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +318 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +49 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +124 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +150 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +267 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +109 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +351 -0
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +60 -0
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +129 -0
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +348 -0
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +102 -0
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +124 -0
- package/es/stat-editor/stat-settings/public-setting/calender.js +124 -0
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +15 -0
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +60 -0
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +57 -0
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +41 -0
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +64 -0
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +118 -0
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +39 -0
- package/es/stat-list/chart-preview.js +139 -0
- package/es/stat-list/index.js +275 -0
- package/es/stat-view/area-chart.js +521 -0
- package/es/stat-view/bar-chart.js +568 -0
- package/es/stat-view/base-chart.js +44 -0
- package/es/stat-view/basic-number-card.js +255 -0
- package/es/stat-view/combination-chart.js +558 -0
- package/es/stat-view/compare-chart.js +485 -0
- package/es/stat-view/completeness-chart.js +389 -0
- package/es/stat-view/custom-bar.js +433 -0
- package/es/stat-view/dashboard-chart.js +317 -0
- package/es/stat-view/heat-map.js +501 -0
- package/es/stat-view/horizontal-bar-chart.js +569 -0
- package/es/stat-view/index.js +183 -0
- package/es/stat-view/line-chart.js +505 -0
- package/es/stat-view/map.js +428 -0
- package/es/stat-view/mirror.js +285 -0
- package/es/stat-view/pie-chart.js +326 -0
- package/es/stat-view/pivot-table/index.js +206 -0
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +133 -0
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +164 -0
- package/es/stat-view/pivot-table/statistic-pivot-table.module.css +132 -0
- package/es/stat-view/pivot-table/two-dimension-table.js +344 -0
- package/es/stat-view/ring-chart.js +416 -0
- package/es/stat-view/scatter-chart.js +367 -0
- package/es/stat-view/treemap-chart.js +318 -0
- package/es/stat-view/trend-chart.js +299 -0
- package/es/stat-view/world-map.js +443 -0
- package/es/tabs/index.js +252 -0
- package/es/tabs/statistic-tabs.module.css +154 -0
- package/es/tabs/tab.js +167 -0
- package/es/utils/basic-chart-utils.js +24 -0
- package/es/utils/cell-format.js +110 -0
- package/es/utils/cell-value.js +27 -0
- package/es/utils/collaborator.js +31 -0
- package/es/utils/color-utils.js +112 -0
- package/es/utils/column-utils.js +18 -0
- package/es/utils/column.js +13 -0
- package/es/utils/common-utils.js +303 -0
- package/es/utils/date-format.js +65 -0
- package/es/utils/export-table-utils.js +632 -0
- package/es/utils/index.js +26 -0
- package/es/utils/object.js +26 -0
- package/es/utils/row-utils.js +115 -0
- package/es/utils/search.js +67 -0
- package/es/utils/sql-utils.js +293 -0
- package/es/utils/stat-utils.js +353 -0
- package/es/utils/trend-utils.js +136 -0
- package/index.js +1 -0
- package/package.json +188 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import React, { Component, Fragment } from 'react';
|
|
7
|
+
import { Input } from 'reactstrap';
|
|
8
|
+
import intl from 'react-intl-universal';
|
|
9
|
+
import ColumnSettings from '../public-setting/column-settings';
|
|
10
|
+
import { DTableSelect } from '../../../components';
|
|
11
|
+
import BaseSettings from '../public-setting/base-settings';
|
|
12
|
+
import { STATISTICS_COUNT_SHOW, SUMMARY_METHOD } from '../../../constants';
|
|
13
|
+
var BasicNumberCardSettings = /*#__PURE__*/function (_Component) {
|
|
14
|
+
_inherits(BasicNumberCardSettings, _Component);
|
|
15
|
+
var _super = _createSuper(BasicNumberCardSettings);
|
|
16
|
+
function BasicNumberCardSettings(props) {
|
|
17
|
+
var _this;
|
|
18
|
+
_classCallCheck(this, BasicNumberCardSettings);
|
|
19
|
+
_this = _super.call(this, props);
|
|
20
|
+
_this.getSelectedStatColumnOption = function () {
|
|
21
|
+
return _this.numericColumnOptions.find(function (option) {
|
|
22
|
+
return option.value.key === _this.props.statItem.numeric_column;
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
_this.onSelectStatColumn = function (option) {
|
|
26
|
+
var numeric_column = _this.props.statItem.numeric_column;
|
|
27
|
+
var new_column = option.value.key;
|
|
28
|
+
if (numeric_column === new_column) return;
|
|
29
|
+
_this.props.updateStatItem(Object.assign({}, _this.props.statItem, {
|
|
30
|
+
numeric_column: new_column
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
_this.getSummaryMethodsOptions = function () {
|
|
34
|
+
var numberCardSummaryMethod = ['Row_count'].concat(_toConsumableArray(SUMMARY_METHOD));
|
|
35
|
+
return numberCardSummaryMethod.map(function (method) {
|
|
36
|
+
return {
|
|
37
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
className: "select-option-name"
|
|
39
|
+
}, intl.get(STATISTICS_COUNT_SHOW[method])),
|
|
40
|
+
value: method
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
_this.onSelectSummaryMethod = function (option) {
|
|
45
|
+
_this.props.onSelectSummaryMethod(option.value);
|
|
46
|
+
};
|
|
47
|
+
_this.getSelectedMethodOption = function (method, summaryMethodsOptions) {
|
|
48
|
+
return summaryMethodsOptions.find(function (m) {
|
|
49
|
+
return m.value === method;
|
|
50
|
+
}) || summaryMethodsOptions[0];
|
|
51
|
+
};
|
|
52
|
+
_this.renderSummaryMethod = function () {
|
|
53
|
+
var statItem = _this.props.statItem;
|
|
54
|
+
var summary_method = statItem.summary_method;
|
|
55
|
+
var selectedMethodOption = _this.getSelectedMethodOption(summary_method, _this.summaryMethodsOptions);
|
|
56
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: "statistic-chart-parameter-item"
|
|
58
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Summary_method')), /*#__PURE__*/React.createElement(DTableSelect, {
|
|
59
|
+
value: selectedMethodOption,
|
|
60
|
+
onChange: _this.onSelectSummaryMethod,
|
|
61
|
+
options: _this.summaryMethodsOptions
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
_this.onChangeName = function (event) {
|
|
65
|
+
var value = event.target.value;
|
|
66
|
+
_this.setState({
|
|
67
|
+
statName: value
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
_this.onSaveName = function (event) {
|
|
71
|
+
_this.props.updateStatItem(Object.assign({}, _this.props.statItem, {
|
|
72
|
+
name: _this.state.statName
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
_this.onKeyDown = function (e) {
|
|
76
|
+
if (e.key == 'Enter') {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
e.target.blur();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
_this.getStyleSetting = function () {
|
|
82
|
+
var statItem = _this.props.statItem;
|
|
83
|
+
var statName = _this.state.statName;
|
|
84
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: "statistic-chart-parameter-item"
|
|
86
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Label')), /*#__PURE__*/React.createElement(Input, {
|
|
87
|
+
type: "text",
|
|
88
|
+
value: statName,
|
|
89
|
+
placeholder: statItem.name,
|
|
90
|
+
onBlur: _this.onSaveName,
|
|
91
|
+
onChange: _this.onChangeName,
|
|
92
|
+
onKeyDown: _this.onKeyDown
|
|
93
|
+
})));
|
|
94
|
+
};
|
|
95
|
+
var numericColumns = props.numericColumns,
|
|
96
|
+
getColumnsOptions = props.getColumnsOptions,
|
|
97
|
+
_statItem = props.statItem;
|
|
98
|
+
_this.numericColumnOptions = getColumnsOptions(numericColumns);
|
|
99
|
+
_this.summaryMethodsOptions = _this.getSummaryMethodsOptions();
|
|
100
|
+
_this.state = {
|
|
101
|
+
statName: _statItem.name || ''
|
|
102
|
+
};
|
|
103
|
+
return _this;
|
|
104
|
+
}
|
|
105
|
+
_createClass(BasicNumberCardSettings, [{
|
|
106
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
107
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
108
|
+
if (nextProps.selectedTableId !== this.props.selectedTableId) {
|
|
109
|
+
var numericColumns = nextProps.numericColumns,
|
|
110
|
+
getColumnsOptions = nextProps.getColumnsOptions;
|
|
111
|
+
this.numericColumnOptions = getColumnsOptions(numericColumns);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
key: "render",
|
|
116
|
+
value: function render() {
|
|
117
|
+
var selectedColumnOption = this.getSelectedStatColumnOption();
|
|
118
|
+
var _this$props = this.props,
|
|
119
|
+
statItem = _this$props.statItem,
|
|
120
|
+
updateStatItem = _this$props.updateStatItem,
|
|
121
|
+
selectedTableId = _this$props.selectedTableId,
|
|
122
|
+
settingType = _this$props.settingType;
|
|
123
|
+
if (settingType === 'style') {
|
|
124
|
+
return this.getStyleSetting();
|
|
125
|
+
}
|
|
126
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseSettings, {
|
|
127
|
+
statItem: statItem,
|
|
128
|
+
selectedTableId: selectedTableId,
|
|
129
|
+
selectedViewId: statItem.view_id,
|
|
130
|
+
getTables: this.props.getTables,
|
|
131
|
+
getViews: this.props.getViews,
|
|
132
|
+
getTableById: this.props.getTableById,
|
|
133
|
+
updateStatItem: updateStatItem
|
|
134
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "statistic-chart-parameter-divider"
|
|
136
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "statistic-chart-parameter-item"
|
|
138
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Statistic_field')), /*#__PURE__*/React.createElement(ColumnSettings, {
|
|
139
|
+
columnsOptions: this.numericColumnOptions,
|
|
140
|
+
selectedColumnOption: selectedColumnOption,
|
|
141
|
+
onChangeSelectedColumn: this.onSelectStatColumn
|
|
142
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: "statistic-chart-parameter-item"
|
|
144
|
+
}, this.renderSummaryMethod()));
|
|
145
|
+
}
|
|
146
|
+
}]);
|
|
147
|
+
return BasicNumberCardSettings;
|
|
148
|
+
}(Component);
|
|
149
|
+
export default BasicNumberCardSettings;
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React, { Component, Fragment } from 'react';
|
|
6
|
+
import { Input } from 'reactstrap';
|
|
7
|
+
import intl from 'react-intl-universal';
|
|
8
|
+
import { CellType, TableUtils } from 'dtable-store';
|
|
9
|
+
import { DTableSelect } from '../../../components';
|
|
10
|
+
import ColumnSettings from '../public-setting/column-settings';
|
|
11
|
+
import BaseSettings from '../public-setting/base-settings';
|
|
12
|
+
import CombinationStyleSettings from './style-setting/combination-style-setting';
|
|
13
|
+
import ToggleSetting from '../public-setting/toggle-setting';
|
|
14
|
+
import SummarySettings from './summary-settings';
|
|
15
|
+
import { BASIC_CHART_COLUMN_LIST, DATE_GRANULARITY, GEOLOCATION_GRANULARITY, STATISTICS_COUNT_SHOW, SUMMARY_METHOD, SUMMARY_TYPE } from '../../../constants';
|
|
16
|
+
var DATE_COLUMN_OPTIONS = ['date', 'mtime', 'ctime'];
|
|
17
|
+
var DATE_GRANULARITY_LIST = [DATE_GRANULARITY.DAY, DATE_GRANULARITY.WEEK, DATE_GRANULARITY.MONTH, DATE_GRANULARITY.QUARTER, DATE_GRANULARITY.YEAR];
|
|
18
|
+
var GEOLOCATION_GRANULARITY_LIST = [GEOLOCATION_GRANULARITY.PROVINCE, GEOLOCATION_GRANULARITY.CITY, GEOLOCATION_GRANULARITY.DISTRICT];
|
|
19
|
+
var GROUP_TYPES = {
|
|
20
|
+
COUNT: 'count',
|
|
21
|
+
SINGLE_NUMERIC_COLUMN: 'single_numeric_column',
|
|
22
|
+
MULTIPLE_NUMERIC_COLUMN: 'multiple_numeric_column'
|
|
23
|
+
};
|
|
24
|
+
var CombinationSettings = /*#__PURE__*/function (_Component) {
|
|
25
|
+
_inherits(CombinationSettings, _Component);
|
|
26
|
+
var _super = _createSuper(CombinationSettings);
|
|
27
|
+
function CombinationSettings(props) {
|
|
28
|
+
var _this;
|
|
29
|
+
_classCallCheck(this, CombinationSettings);
|
|
30
|
+
_this = _super.call(this, props);
|
|
31
|
+
_this.getGranularityOptions = function (options) {
|
|
32
|
+
return options.map(function (g) {
|
|
33
|
+
return {
|
|
34
|
+
value: g,
|
|
35
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
className: 'select-module select-module-name'
|
|
37
|
+
}, intl.get(STATISTICS_COUNT_SHOW[g]))
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
_this.renderGroupbyDateGranularity = function () {
|
|
42
|
+
var statItem = _this.props.statItem;
|
|
43
|
+
var selectedDateGranularity = _this.getSelectedDateGranularity(statItem.x_axis_date_granularity);
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "mt-1"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(DTableSelect, {
|
|
47
|
+
value: selectedDateGranularity,
|
|
48
|
+
onChange: _this.onSelectGroupbyDateGranularity,
|
|
49
|
+
options: _this.dateGranularityOptions
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
_this.onSelectGroupbyDateGranularity = function (option) {
|
|
53
|
+
var newDateGranularity = option.value;
|
|
54
|
+
if (newDateGranularity === _this.props.statItem.x_axis_date_granularity) return;
|
|
55
|
+
_this.props.updateStatItem(Object.assign({}, _this.props.statItem, {
|
|
56
|
+
x_axis_date_granularity: newDateGranularity
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
_this.renderGroupbyGeolocationGranularity = function () {
|
|
60
|
+
var statItem = _this.props.statItem;
|
|
61
|
+
var selectedGeolocationGranularity = _this.getSelectedGeolocationGranularity(statItem.x_axis_geolocation_granularity);
|
|
62
|
+
if (_this.geolocationGranularityOptions.length === 0) return null;
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: "mt-1"
|
|
65
|
+
}, /*#__PURE__*/React.createElement(DTableSelect, {
|
|
66
|
+
value: selectedGeolocationGranularity,
|
|
67
|
+
onChange: _this.onSelectGroupbyGeolocationGranularity,
|
|
68
|
+
options: _this.geolocationGranularityOptions
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
_this.getSelectedGeolocationGranularity = function (geolocationGranularity) {
|
|
72
|
+
return _this.geolocationGranularityOptions.find(function (g) {
|
|
73
|
+
return g.value === geolocationGranularity;
|
|
74
|
+
}) || _this.geolocationGranularityOptions[2];
|
|
75
|
+
};
|
|
76
|
+
_this.getSelectedDateGranularity = function (dateGranularity) {
|
|
77
|
+
return _this.dateGranularityOptions.find(function (g) {
|
|
78
|
+
return g.value === dateGranularity;
|
|
79
|
+
}) || _this.dateGranularityOptions[2];
|
|
80
|
+
};
|
|
81
|
+
_this.onSelectGroupbyGeolocationGranularity = function (geolocationGranularityOption) {
|
|
82
|
+
var newGeolocationGranularity = geolocationGranularityOption.value;
|
|
83
|
+
if (newGeolocationGranularity === _this.props.statItem.x_axis_geolocation_granularity) return;
|
|
84
|
+
_this.props.updateStatItem(Object.assign({}, _this.props.statItem, {
|
|
85
|
+
x_axis_geolocation_granularity: newGeolocationGranularity
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
_this.getAvailableColumns = function (columns) {
|
|
89
|
+
if (!columns || !Array.isArray(columns)) return [];
|
|
90
|
+
return columns.filter(function (c) {
|
|
91
|
+
return BASIC_CHART_COLUMN_LIST.includes(c.type);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
_this.getSelectedStatColumnOption = function () {
|
|
95
|
+
return _this.columnsOptions.find(function (option) {
|
|
96
|
+
return option.value.key === _this.props.statItem.x_axis_column_key;
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
_this.onSelectStatColumn = function (option) {
|
|
100
|
+
var _this$props = _this.props,
|
|
101
|
+
getTableById = _this$props.getTableById,
|
|
102
|
+
selectedTableId = _this$props.selectedTableId,
|
|
103
|
+
statItem = _this$props.statItem;
|
|
104
|
+
var _this$props$statItem = _this.props.statItem,
|
|
105
|
+
x_axis_column_key = _this$props$statItem.x_axis_column_key,
|
|
106
|
+
x_axis_geolocation_granularity = _this$props$statItem.x_axis_geolocation_granularity,
|
|
107
|
+
x_axis_date_granularity = _this$props$statItem.x_axis_date_granularity;
|
|
108
|
+
var new_column = option.value.key;
|
|
109
|
+
if (x_axis_column_key === new_column) return;
|
|
110
|
+
var _option$value = option.value,
|
|
111
|
+
type = _option$value.type,
|
|
112
|
+
key = _option$value.key;
|
|
113
|
+
if (type === CellType.DATE) {
|
|
114
|
+
x_axis_date_granularity = _this.dateGranularityOptions[2].value;
|
|
115
|
+
} else {
|
|
116
|
+
x_axis_date_granularity = null;
|
|
117
|
+
}
|
|
118
|
+
if (type === CellType.GEOLOCATION) {
|
|
119
|
+
var selectedTable = getTableById(selectedTableId);
|
|
120
|
+
var geoColumn = selectedTable.columns.find(function (column) {
|
|
121
|
+
return column.key === key;
|
|
122
|
+
}) || {};
|
|
123
|
+
var _ref = geoColumn.data || {},
|
|
124
|
+
geo_format = _ref.geo_format;
|
|
125
|
+
if (geo_format === 'province') {
|
|
126
|
+
x_axis_geolocation_granularity = 'province';
|
|
127
|
+
} else if (geo_format === 'province_city') {
|
|
128
|
+
x_axis_geolocation_granularity = 'city';
|
|
129
|
+
} else if (geo_format === 'geolocation' || !geo_format) {
|
|
130
|
+
x_axis_geolocation_granularity = 'district';
|
|
131
|
+
} else {
|
|
132
|
+
x_axis_geolocation_granularity = null;
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
x_axis_geolocation_granularity = null;
|
|
136
|
+
}
|
|
137
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
138
|
+
x_axis_column_key: new_column,
|
|
139
|
+
x_axis_date_granularity: x_axis_date_granularity,
|
|
140
|
+
x_axis_geolocation_granularity: x_axis_geolocation_granularity
|
|
141
|
+
}));
|
|
142
|
+
};
|
|
143
|
+
_this.getSummaryMethodsOptions = function () {
|
|
144
|
+
return SUMMARY_METHOD.map(function (method) {
|
|
145
|
+
return {
|
|
146
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
147
|
+
className: "select-option-name"
|
|
148
|
+
}, intl.get(STATISTICS_COUNT_SHOW[method])),
|
|
149
|
+
value: method
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
_this.getSelectedMethodOption = function (method, summaryMethodsOptions) {
|
|
154
|
+
return summaryMethodsOptions.find(function (m) {
|
|
155
|
+
return m.value === method;
|
|
156
|
+
}) || summaryMethodsOptions[0];
|
|
157
|
+
};
|
|
158
|
+
_this.onSaveName = function (event) {
|
|
159
|
+
_this.props.updateStatItem(Object.assign({}, _this.props.statItem, {
|
|
160
|
+
name: _this.state.statName
|
|
161
|
+
}));
|
|
162
|
+
};
|
|
163
|
+
_this.getStyleSetting = function () {
|
|
164
|
+
var statItem = _this.props.statItem;
|
|
165
|
+
var statName = _this.state.statName;
|
|
166
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: "statistic-chart-parameter-item"
|
|
168
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('X-axis')), /*#__PURE__*/React.createElement(Input, {
|
|
169
|
+
type: "text",
|
|
170
|
+
onBlur: _this.onSaveName,
|
|
171
|
+
onChange: _this.onChangeName,
|
|
172
|
+
value: statName,
|
|
173
|
+
placeholder: statItem.name
|
|
174
|
+
})));
|
|
175
|
+
};
|
|
176
|
+
_this.onChangeSummaryType = function (option, position) {
|
|
177
|
+
var statItem = _this.props.statItem;
|
|
178
|
+
var y_axis_right_summary_type = statItem.y_axis_right_summary_type,
|
|
179
|
+
y_axis_left_summary_type = statItem.y_axis_left_summary_type,
|
|
180
|
+
y_axis_right_summary_column = statItem.y_axis_right_summary_column,
|
|
181
|
+
y_axis_left_summary_column = statItem.y_axis_left_summary_column,
|
|
182
|
+
y_axis_left_group_by_multiple_numeric_column = statItem.y_axis_left_group_by_multiple_numeric_column,
|
|
183
|
+
y_axis_left_summary_method = statItem.y_axis_left_summary_method,
|
|
184
|
+
y_axis_left_group_by_numeric_columns = statItem.y_axis_left_group_by_numeric_columns;
|
|
185
|
+
var newSummaryType = option === GROUP_TYPES.COUNT ? SUMMARY_TYPE.COUNT : SUMMARY_TYPE.ADVANCED;
|
|
186
|
+
if (position === 'left') {
|
|
187
|
+
if (newSummaryType === SUMMARY_TYPE.COUNT && y_axis_left_summary_type === SUMMARY_TYPE.COUNT) return;
|
|
188
|
+
if (option === GROUP_TYPES.SINGLE_NUMERIC_COLUMN && !y_axis_left_group_by_multiple_numeric_column && y_axis_left_summary_type !== SUMMARY_TYPE.COUNT) return;
|
|
189
|
+
if (option === GROUP_TYPES.MULTIPLE_NUMERIC_COLUMN && y_axis_left_group_by_multiple_numeric_column) return;
|
|
190
|
+
if (option === GROUP_TYPES.COUNT) {
|
|
191
|
+
y_axis_left_summary_column = null;
|
|
192
|
+
y_axis_left_summary_method = null;
|
|
193
|
+
y_axis_left_group_by_multiple_numeric_column = false;
|
|
194
|
+
y_axis_left_group_by_numeric_columns = [];
|
|
195
|
+
}
|
|
196
|
+
if (option === GROUP_TYPES.SINGLE_NUMERIC_COLUMN) {
|
|
197
|
+
y_axis_left_summary_column = null;
|
|
198
|
+
y_axis_left_summary_method = SUMMARY_METHOD[0];
|
|
199
|
+
y_axis_left_group_by_multiple_numeric_column = false;
|
|
200
|
+
y_axis_left_group_by_numeric_columns = [];
|
|
201
|
+
}
|
|
202
|
+
if (option === GROUP_TYPES.MULTIPLE_NUMERIC_COLUMN) {
|
|
203
|
+
y_axis_left_summary_column = null;
|
|
204
|
+
y_axis_left_summary_method = SUMMARY_METHOD[0];
|
|
205
|
+
y_axis_left_group_by_multiple_numeric_column = true;
|
|
206
|
+
y_axis_left_group_by_numeric_columns = [];
|
|
207
|
+
}
|
|
208
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
209
|
+
y_axis_left_summary_type: newSummaryType,
|
|
210
|
+
y_axis_left_summary_column: y_axis_left_summary_column,
|
|
211
|
+
y_axis_left_summary_method: y_axis_left_summary_method,
|
|
212
|
+
y_axis_left_group_by_multiple_numeric_column: y_axis_left_group_by_multiple_numeric_column,
|
|
213
|
+
y_axis_left_group_by_numeric_columns: y_axis_left_group_by_numeric_columns
|
|
214
|
+
}));
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (y_axis_right_summary_type === newSummaryType) return;
|
|
218
|
+
y_axis_right_summary_type = newSummaryType;
|
|
219
|
+
var y_axis_right_summary_method = SUMMARY_METHOD[0];
|
|
220
|
+
if (newSummaryType === SUMMARY_TYPE.COUNT) {
|
|
221
|
+
y_axis_right_summary_column = null;
|
|
222
|
+
y_axis_right_summary_method = null;
|
|
223
|
+
}
|
|
224
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
225
|
+
y_axis_right_summary_type: newSummaryType,
|
|
226
|
+
y_axis_right_summary_column: y_axis_right_summary_column,
|
|
227
|
+
y_axis_right_summary_method: y_axis_right_summary_method
|
|
228
|
+
}));
|
|
229
|
+
};
|
|
230
|
+
_this.onSelectSummaryColumn = function (option, position) {
|
|
231
|
+
var statItem = _this.props.statItem;
|
|
232
|
+
var y_axis_right_summary_column = statItem.y_axis_right_summary_column,
|
|
233
|
+
y_axis_left_summary_column = statItem.y_axis_left_summary_column,
|
|
234
|
+
y_axis_left_summary_method = statItem.y_axis_left_summary_method,
|
|
235
|
+
y_axis_right_summary_method = statItem.y_axis_right_summary_method;
|
|
236
|
+
var newSummaryColumnKey = option;
|
|
237
|
+
if (position === 'left') {
|
|
238
|
+
if (y_axis_left_summary_column === newSummaryColumnKey) return;
|
|
239
|
+
if (!y_axis_left_summary_method) {
|
|
240
|
+
y_axis_left_summary_method = 'Sum';
|
|
241
|
+
}
|
|
242
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
243
|
+
y_axis_left_summary_column: newSummaryColumnKey,
|
|
244
|
+
y_axis_left_summary_method: y_axis_left_summary_method
|
|
245
|
+
}));
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (y_axis_right_summary_column === newSummaryColumnKey) return;
|
|
249
|
+
if (!y_axis_right_summary_method) {
|
|
250
|
+
y_axis_right_summary_method = 'Sum';
|
|
251
|
+
}
|
|
252
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
253
|
+
y_axis_right_summary_column: newSummaryColumnKey,
|
|
254
|
+
y_axis_right_summary_method: y_axis_right_summary_method
|
|
255
|
+
}));
|
|
256
|
+
};
|
|
257
|
+
_this.onSelectSummaryMethod = function (option, position) {
|
|
258
|
+
var statItem = _this.props.statItem;
|
|
259
|
+
var y_axis_right_summary_method = statItem.y_axis_right_summary_method,
|
|
260
|
+
y_axis_left_summary_method = statItem.y_axis_left_summary_method;
|
|
261
|
+
var newSummaryColumnMethod = option;
|
|
262
|
+
if (position === 'left') {
|
|
263
|
+
if (y_axis_left_summary_method !== newSummaryColumnMethod) {
|
|
264
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
265
|
+
y_axis_left_summary_method: newSummaryColumnMethod
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (y_axis_right_summary_method !== newSummaryColumnMethod) {
|
|
271
|
+
_this.props.updateStatItem(Object.assign({}, statItem, {
|
|
272
|
+
y_axis_right_summary_method: newSummaryColumnMethod
|
|
273
|
+
}));
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
_this.onToggleIncludeEmpty = function () {
|
|
277
|
+
var statItem = _this.props.statItem;
|
|
278
|
+
var _ref2 = statItem || {},
|
|
279
|
+
x_axis_include_empty = _ref2.x_axis_include_empty;
|
|
280
|
+
var updated = {
|
|
281
|
+
x_axis_include_empty: !x_axis_include_empty
|
|
282
|
+
};
|
|
283
|
+
_this.props.updateStatItem(Object.assign({}, statItem, updated));
|
|
284
|
+
};
|
|
285
|
+
_this.renderIncludeEmpty = function () {
|
|
286
|
+
var statItem = _this.props.statItem;
|
|
287
|
+
var _ref3 = statItem || {},
|
|
288
|
+
x_axis_include_empty = _ref3.x_axis_include_empty;
|
|
289
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
290
|
+
className: "mt-1"
|
|
291
|
+
}, /*#__PURE__*/React.createElement(ToggleSetting, {
|
|
292
|
+
isChecked: x_axis_include_empty || false,
|
|
293
|
+
handleToggleChange: _this.onToggleIncludeEmpty,
|
|
294
|
+
label: intl.get('Including_empty_cell')
|
|
295
|
+
}));
|
|
296
|
+
};
|
|
297
|
+
var getColumnsOptions = props.getColumnsOptions,
|
|
298
|
+
_statItem = props.statItem,
|
|
299
|
+
_columns = props.columns;
|
|
300
|
+
var availableColumns = _this.getAvailableColumns(_columns);
|
|
301
|
+
_this.columnsOptions = getColumnsOptions(availableColumns);
|
|
302
|
+
_this.summaryMethodsOptions = _this.getSummaryMethodsOptions();
|
|
303
|
+
_this.dateGranularityOptions = _this.getGranularityOptions(DATE_GRANULARITY_LIST);
|
|
304
|
+
_this.geolocationGranularityOptions = _this.getGranularityOptions(GEOLOCATION_GRANULARITY_LIST);
|
|
305
|
+
_this.state = {
|
|
306
|
+
statName: _statItem.name
|
|
307
|
+
};
|
|
308
|
+
return _this;
|
|
309
|
+
}
|
|
310
|
+
_createClass(CombinationSettings, [{
|
|
311
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
312
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
313
|
+
if (nextProps.selectedTableId !== this.props.selectedTableId) {
|
|
314
|
+
var getColumnsOptions = nextProps.getColumnsOptions,
|
|
315
|
+
columns = nextProps.columns;
|
|
316
|
+
var availableColumns = this.getAvailableColumns(columns);
|
|
317
|
+
this.columnsOptions = getColumnsOptions(availableColumns);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}, {
|
|
321
|
+
key: "render",
|
|
322
|
+
value: function render() {
|
|
323
|
+
var _this2 = this;
|
|
324
|
+
var selectedColumnOption = this.getSelectedStatColumnOption();
|
|
325
|
+
var _this$props2 = this.props,
|
|
326
|
+
getTables = _this$props2.getTables,
|
|
327
|
+
getViews = _this$props2.getViews,
|
|
328
|
+
getTableById = _this$props2.getTableById,
|
|
329
|
+
statItem = _this$props2.statItem,
|
|
330
|
+
eventBus = _this$props2.eventBus,
|
|
331
|
+
updateStatItem = _this$props2.updateStatItem,
|
|
332
|
+
selectedTableId = _this$props2.selectedTableId,
|
|
333
|
+
settingType = _this$props2.settingType,
|
|
334
|
+
getColumnsOptions = _this$props2.getColumnsOptions;
|
|
335
|
+
var x_axis_column_key = statItem.x_axis_column_key,
|
|
336
|
+
y_axis_left_summary_type = statItem.y_axis_left_summary_type,
|
|
337
|
+
y_axis_right_summary_type = statItem.y_axis_right_summary_type,
|
|
338
|
+
y_axis_left_summary_method = statItem.y_axis_left_summary_method,
|
|
339
|
+
y_axis_right_summary_method = statItem.y_axis_right_summary_method,
|
|
340
|
+
y_axis_left_summary_column = statItem.y_axis_left_summary_column,
|
|
341
|
+
y_axis_right_summary_column = statItem.y_axis_right_summary_column;
|
|
342
|
+
var selectedTable = getTableById(selectedTableId);
|
|
343
|
+
var groupbyColumn = x_axis_column_key && TableUtils.getTableColumnByKey(selectedTable, x_axis_column_key);
|
|
344
|
+
var _ref4 = groupbyColumn || {},
|
|
345
|
+
groupbyColumnType = _ref4.type;
|
|
346
|
+
if (settingType === 'style') {
|
|
347
|
+
return /*#__PURE__*/React.createElement(CombinationStyleSettings, {
|
|
348
|
+
selectedTableId: selectedTableId,
|
|
349
|
+
statItem: statItem,
|
|
350
|
+
eventBus: eventBus,
|
|
351
|
+
updateStatItem: updateStatItem
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseSettings, {
|
|
355
|
+
statItem: statItem,
|
|
356
|
+
selectedTableId: selectedTableId,
|
|
357
|
+
selectedViewId: statItem.view_id,
|
|
358
|
+
getTables: getTables,
|
|
359
|
+
getViews: getViews,
|
|
360
|
+
getTableById: this.props.getTableById,
|
|
361
|
+
updateStatItem: updateStatItem
|
|
362
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
363
|
+
className: "statistic-chart-parameter-divider"
|
|
364
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
365
|
+
className: "statistic-chart-parameter-item"
|
|
366
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('X-axis')), /*#__PURE__*/React.createElement(ColumnSettings, {
|
|
367
|
+
columnsOptions: this.columnsOptions,
|
|
368
|
+
selectedColumnOption: selectedColumnOption,
|
|
369
|
+
onChangeSelectedColumn: this.onSelectStatColumn
|
|
370
|
+
}), DATE_COLUMN_OPTIONS.includes(groupbyColumnType) && this.renderGroupbyDateGranularity(), groupbyColumnType === CellType.GEOLOCATION && this.renderGroupbyGeolocationGranularity(), this.renderIncludeEmpty()), /*#__PURE__*/React.createElement(SummarySettings, {
|
|
371
|
+
useMultipleSummaryColumns: true,
|
|
372
|
+
chartType: 'combination_chart',
|
|
373
|
+
label: intl.get('Y-axis(left side)'),
|
|
374
|
+
statItem: statItem,
|
|
375
|
+
selectedTableId: selectedTableId,
|
|
376
|
+
summaryType: y_axis_left_summary_type,
|
|
377
|
+
summaryMethod: y_axis_left_summary_method,
|
|
378
|
+
summaryColumn: y_axis_left_summary_column,
|
|
379
|
+
numericColumns: this.props.numericColumns,
|
|
380
|
+
getColumnsOptions: getColumnsOptions,
|
|
381
|
+
onChangeSummaryType: function onChangeSummaryType(option) {
|
|
382
|
+
return _this2.onChangeSummaryType(option, 'left');
|
|
383
|
+
},
|
|
384
|
+
onSelectSummaryColumn: function onSelectSummaryColumn(option) {
|
|
385
|
+
return _this2.onSelectSummaryColumn(option, 'left');
|
|
386
|
+
},
|
|
387
|
+
onSelectSummaryMethod: function onSelectSummaryMethod(option) {
|
|
388
|
+
return _this2.onSelectSummaryMethod(option, 'left');
|
|
389
|
+
},
|
|
390
|
+
updateStatItem: updateStatItem
|
|
391
|
+
}), /*#__PURE__*/React.createElement(SummarySettings, {
|
|
392
|
+
chartType: 'combination_chart',
|
|
393
|
+
label: intl.get('Y-axis(right side)'),
|
|
394
|
+
statItem: statItem,
|
|
395
|
+
selectedTableId: selectedTableId,
|
|
396
|
+
summaryType: y_axis_right_summary_type,
|
|
397
|
+
summaryMethod: y_axis_right_summary_method,
|
|
398
|
+
summaryColumn: y_axis_right_summary_column,
|
|
399
|
+
numericColumns: this.props.numericColumns,
|
|
400
|
+
getColumnsOptions: getColumnsOptions,
|
|
401
|
+
onChangeSummaryType: function onChangeSummaryType(option) {
|
|
402
|
+
return _this2.onChangeSummaryType(option, 'right');
|
|
403
|
+
},
|
|
404
|
+
onSelectSummaryColumn: function onSelectSummaryColumn(option) {
|
|
405
|
+
return _this2.onSelectSummaryColumn(option, 'right');
|
|
406
|
+
},
|
|
407
|
+
onSelectSummaryMethod: function onSelectSummaryMethod(option) {
|
|
408
|
+
return _this2.onSelectSummaryMethod(option, 'right');
|
|
409
|
+
}
|
|
410
|
+
}));
|
|
411
|
+
}
|
|
412
|
+
}]);
|
|
413
|
+
return CombinationSettings;
|
|
414
|
+
}(Component);
|
|
415
|
+
export default CombinationSettings;
|