dtable-statistic 4.3.3 → 4.3.4
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/es/api/dtable-db-api.js +3 -10
- package/es/calculator/base-calculator.js +12 -20
- package/es/calculator/basic-chart-calculator.js +65 -72
- package/es/calculator/combination-calculator.js +57 -64
- package/es/calculator/compare-bar-calculator.js +26 -33
- package/es/calculator/completeness-calculator.js +30 -37
- package/es/calculator/copy-value.js +1 -7
- package/es/calculator/dashboard-calculator.js +13 -20
- package/es/calculator/heat-map-calculator.js +18 -25
- package/es/calculator/horizontal-bar-calculator.js +8 -15
- package/es/calculator/index.js +35 -42
- package/es/calculator/map-calculator.js +22 -29
- package/es/calculator/mirror-calculator.js +20 -27
- package/es/calculator/number-card-calculator.js +10 -17
- package/es/calculator/pivot-table-calculator.js +58 -65
- package/es/calculator/scatter-calculator.js +14 -21
- package/es/calculator/thread-manager.js +1 -7
- package/es/calculator/trend-calculator.js +22 -29
- package/es/calculator/workers/basic-chart-calculator-worker.js +76 -83
- package/es/calculator/workers/calculator.worker.js +30 -33
- package/es/calculator/workers/card-calculator-worker.js +13 -19
- package/es/calculator/workers/combination-calculator-worker.js +46 -53
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +22 -29
- package/es/calculator/workers/completeness-calculator-worker.js +34 -41
- package/es/calculator/workers/dashboard-calculator-worker.js +18 -24
- package/es/calculator/workers/mirror-calculator-worker.js +22 -29
- package/es/calculator/workers/pivot-table-calculator-worker.js +77 -84
- package/es/calculator/workers/scatter-calculator-worker.js +20 -27
- package/es/calculator/workers/trend-calculator-worker.js +27 -34
- package/es/calculator/world-map-calculator.js +17 -24
- package/es/components/common-add-tool.js +5 -12
- package/es/components/dialog/chart-addition-edit-dialog.js +12 -20
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +101 -108
- package/es/components/dialog/color-theme-dialog.js +15 -22
- package/es/components/dialog/delete-confirmation-dialog.js +11 -18
- package/es/components/dialog/enlarged-chart-dialog.js +20 -28
- package/es/components/dialog/new-table-dialog.js +16 -23
- package/es/components/dialog/new-view-dialog.js +14 -21
- package/es/components/dialog/rename-view-dialog.js +14 -22
- package/es/components/dialog/statistic-record-dialog/index.js +37 -45
- package/es/components/dialog/statistic-types-dialog/index.js +14 -22
- package/es/components/dialog/table-select-dialog.js +15 -23
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +41 -49
- package/es/components/dtable-popover.js +12 -19
- package/es/components/dtable-search-input.js +13 -21
- package/es/components/dtable-select.js +15 -21
- package/es/components/icon.js +4 -11
- package/es/components/index.js +11 -76
- package/es/components/loading.js +3 -10
- package/es/components/modal-portal.js +5 -12
- package/es/components/popover/color-rules/color-rule.js +25 -33
- package/es/components/popover/color-rules/index.js +6 -14
- package/es/components/popover/color-rules/rule-filters/filter.js +27 -34
- package/es/components/popover/color-rules/rule-filters/index.js +17 -25
- package/es/components/popover/color-rules/rule-filters/number-input.js +9 -17
- package/es/components/popover/color-rules-popover.js +24 -32
- package/es/components/popover/color-selector-popover.js +10 -17
- package/es/components/seatable-radio/index.js +9 -16
- package/es/components/select/index.js +2 -9
- package/es/components/select/option-group.js +19 -27
- package/es/components/select/option.js +6 -14
- package/es/components/select/select.js +17 -25
- package/es/components/toast/alert.js +24 -31
- package/es/components/toast/index.js +3 -10
- package/es/components/toast/toast.js +12 -20
- package/es/components/toast/toastManager.js +9 -17
- package/es/components/toast/toaster.js +6 -14
- package/es/constants/color-rules.js +6 -12
- package/es/constants/dtable-select-style.js +4 -9
- package/es/constants/event-types.js +4 -10
- package/es/constants/index.js +67 -96
- package/es/constants/key-codes.js +0 -2
- package/es/constants/map.js +2 -8
- package/es/constants/model.js +20 -26
- package/es/constants/regions.js +3 -8
- package/es/constants/zIndexes.js +1 -7
- package/es/custom-g2.js +208 -236
- package/es/dashboard.js +50 -58
- package/es/desktop-dashboard.js +47 -55
- package/es/index.js +3 -6
- package/es/locale/index.js +10 -13
- package/es/locale/lang/de.js +1 -7
- package/es/locale/lang/en.js +1 -7
- package/es/locale/lang/fr.js +1 -7
- package/es/locale/lang/zh_CN.js +1 -7
- package/es/mobile-dashboard.js +38 -46
- package/es/model/bar-group.js +11 -19
- package/es/model/bar.js +10 -18
- package/es/model/base-model.js +2 -9
- package/es/model/basic-number-card.js +8 -16
- package/es/model/collaborators.js +2 -9
- package/es/model/combination.js +12 -20
- package/es/model/compare-bar.js +16 -24
- package/es/model/completeness-group.js +8 -16
- package/es/model/completeness.js +5 -13
- package/es/model/custom-bar.js +6 -14
- package/es/model/dashboard.js +6 -14
- package/es/model/generic-model.js +133 -141
- package/es/model/heat-map.js +11 -19
- package/es/model/horizontal-bar-group.js +10 -18
- package/es/model/horizontal-bar.js +10 -18
- package/es/model/index.js +53 -185
- package/es/model/map.js +15 -23
- package/es/model/mirror.js +13 -21
- package/es/model/pie.js +10 -18
- package/es/model/ring.js +11 -19
- package/es/model/scatter.js +6 -14
- package/es/model/statistic-dashboard.js +2 -9
- package/es/model/table.js +10 -18
- package/es/model/trend.js +12 -20
- package/es/model/world-map.js +13 -21
- package/es/service/chart-service.js +7 -14
- package/es/service/dashboard-service.js +34 -41
- package/es/service/map-json.js +8 -14
- package/es/stat-editor/chart-name-editor.js +8 -15
- package/es/stat-editor/index.js +16 -24
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +21 -29
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +49 -57
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +4 -11
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +43 -51
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +37 -45
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +26 -34
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +47 -55
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +22 -30
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +27 -35
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +24 -32
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +33 -41
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +22 -30
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +27 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +46 -54
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +23 -31
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +26 -34
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +77 -85
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +21 -29
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +73 -81
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +16 -24
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +19 -27
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +49 -57
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +47 -55
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +11 -19
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +45 -53
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +9 -17
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +20 -28
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +30 -38
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +50 -58
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +47 -55
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +11 -19
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +12 -19
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +62 -70
- package/es/stat-editor/stat-settings/map/map-level.js +13 -20
- package/es/stat-editor/stat-settings/map/map-province-city.js +20 -27
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +20 -28
- package/es/stat-editor/stat-settings/public-setting/calender.js +22 -29
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +6 -13
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +9 -16
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +13 -21
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +27 -35
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +18 -26
- package/es/stat-list/chart-preview.js +20 -28
- package/es/stat-list/index.js +27 -35
- package/es/stat-view/area-chart.js +43 -50
- package/es/stat-view/bar-chart.js +47 -54
- package/es/stat-view/base-chart.js +24 -32
- package/es/stat-view/basic-number-card.js +19 -26
- package/es/stat-view/combination-chart.js +49 -56
- package/es/stat-view/compare-chart.js +39 -46
- package/es/stat-view/completeness-chart.js +28 -35
- package/es/stat-view/custom-bar.js +31 -38
- package/es/stat-view/dashboard-chart.js +15 -22
- package/es/stat-view/heat-map.js +43 -50
- package/es/stat-view/horizontal-bar-chart.js +51 -58
- package/es/stat-view/index.js +73 -80
- package/es/stat-view/line-chart.js +39 -46
- package/es/stat-view/map.js +33 -40
- package/es/stat-view/mirror.js +21 -28
- package/es/stat-view/pie-chart.js +29 -36
- package/es/stat-view/pivot-table/index.js +32 -39
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +31 -39
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +29 -37
- package/es/stat-view/pivot-table/pivot-table-display-name.js +46 -54
- package/es/stat-view/pivot-table/two-dimension-table.js +62 -70
- package/es/stat-view/ring-chart.js +38 -45
- package/es/stat-view/scatter-chart.js +30 -37
- package/es/stat-view/treemap-chart.js +37 -44
- package/es/stat-view/trend-chart.js +32 -39
- package/es/stat-view/world-map.js +33 -40
- package/es/tabs/index.js +32 -40
- package/es/tabs/tab.js +26 -34
- package/es/utils/basic-chart-utils.js +2 -9
- package/es/utils/cell-format.js +14 -22
- package/es/utils/cell-value.js +7 -14
- package/es/utils/collaborator.js +4 -13
- package/es/utils/color-utils.js +18 -29
- package/es/utils/column-utils.js +18 -29
- package/es/utils/column.js +4 -11
- package/es/utils/common-utils.js +41 -65
- package/es/utils/date-format.js +2 -8
- package/es/utils/export-table-utils.js +82 -91
- package/es/utils/index.js +11 -100
- package/es/utils/map.js +26 -36
- package/es/utils/model.js +6 -14
- package/es/utils/object.js +6 -15
- package/es/utils/pivot-table.js +16 -23
- package/es/utils/row-utils.js +23 -33
- package/es/utils/search.js +21 -29
- package/es/utils/sql-utils.js +65 -75
- package/es/utils/stat-utils.js +60 -66
- package/es/utils/trend-utils.js +32 -40
- package/package.json +1 -1
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
-
var _dtableStore = require("dtable-store");
|
|
12
|
-
var _components = require("../../../components");
|
|
13
|
-
class GroupbySettings extends _react.Component {
|
|
1
|
+
import React, { Component, Fragment } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { CellType, DATE_COLUMN_OPTIONS, TableUtils } from 'dtable-store';
|
|
4
|
+
import { DTableSelect } from '../../../components';
|
|
5
|
+
class GroupbySettings extends Component {
|
|
14
6
|
constructor() {
|
|
15
7
|
super(...arguments);
|
|
8
|
+
this.getCustomFilterOption = (option, input) => {
|
|
9
|
+
var _option$data, _option$data$value;
|
|
10
|
+
const labelValue = (option === null || option === void 0 ? void 0 : (_option$data = option.data) === null || _option$data === void 0 ? void 0 : (_option$data$value = _option$data.value) === null || _option$data$value === void 0 ? void 0 : _option$data$value.name) && option.data.value.name.trim().toLowerCase() || '';
|
|
11
|
+
const inputValue = typeof input === 'string' && input.trim().toLowerCase();
|
|
12
|
+
return labelValue.includes(inputValue);
|
|
13
|
+
};
|
|
16
14
|
this.renderGroupby = () => {
|
|
17
15
|
const {
|
|
18
16
|
columnsOptions,
|
|
@@ -20,11 +18,14 @@ class GroupbySettings extends _react.Component {
|
|
|
20
18
|
label
|
|
21
19
|
} = this.props;
|
|
22
20
|
const selectedColumnOption = this.props.getSelectedColumnOption(groupbyColumnKey, columnsOptions);
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
-
|
|
21
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("label", null, label), /*#__PURE__*/React.createElement(DTableSelect, {
|
|
22
|
+
isSearchable: true,
|
|
23
|
+
placeholder: intl.get('Select_a_column'),
|
|
25
24
|
value: selectedColumnOption,
|
|
26
25
|
onChange: this.onSelectGroupbyColumn,
|
|
27
|
-
options: columnsOptions
|
|
26
|
+
options: columnsOptions,
|
|
27
|
+
customFilterOption: this.getCustomFilterOption,
|
|
28
|
+
noOptionsMessage: () => intl.get('No_options')
|
|
28
29
|
}));
|
|
29
30
|
};
|
|
30
31
|
this.renderGroupbyDateGranularity = () => {
|
|
@@ -33,9 +34,9 @@ class GroupbySettings extends _react.Component {
|
|
|
33
34
|
groupbyDateGranularity
|
|
34
35
|
} = this.props;
|
|
35
36
|
let selectedDateGranularity = this.getSelectedDateGranularity(groupbyDateGranularity);
|
|
36
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
38
|
className: "mt-1"
|
|
38
|
-
}, /*#__PURE__*/
|
|
39
|
+
}, /*#__PURE__*/React.createElement(DTableSelect, {
|
|
39
40
|
value: selectedDateGranularity,
|
|
40
41
|
onChange: this.onSelectGroupbyDateGranularity,
|
|
41
42
|
options: dateGranularityOptions
|
|
@@ -49,9 +50,9 @@ class GroupbySettings extends _react.Component {
|
|
|
49
50
|
geolocationGranularityOptions = this.getGeolocationGranularity();
|
|
50
51
|
let selectedGeolocationGranularity = this.getSelectedGeolocationGranularity(groupbyGeolocationGranularity);
|
|
51
52
|
if (geolocationGranularityOptions.length === 0) return null;
|
|
52
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
53
54
|
className: "mt-1"
|
|
54
|
-
}, /*#__PURE__*/
|
|
55
|
+
}, /*#__PURE__*/React.createElement(DTableSelect, {
|
|
55
56
|
value: selectedGeolocationGranularity,
|
|
56
57
|
onChange: this.onSelectGroupbyGeolocationGranularity,
|
|
57
58
|
options: geolocationGranularityOptions
|
|
@@ -109,10 +110,10 @@ class GroupbySettings extends _react.Component {
|
|
|
109
110
|
}
|
|
110
111
|
if (key !== 'Groupby_null') {
|
|
111
112
|
groupbyColumnKey = key;
|
|
112
|
-
if (type ===
|
|
113
|
+
if (type === CellType.DATE) {
|
|
113
114
|
groupbyDateGranularity = dateGranularityOptions[2].value;
|
|
114
115
|
}
|
|
115
|
-
if (type ===
|
|
116
|
+
if (type === CellType.GEOLOCATION) {
|
|
116
117
|
const geoColumn = selectedTable.columns.find(column => column.key === key) || {};
|
|
117
118
|
const {
|
|
118
119
|
geo_format
|
|
@@ -151,13 +152,13 @@ class GroupbySettings extends _react.Component {
|
|
|
151
152
|
groupbyColumnKey,
|
|
152
153
|
renderIncludeEmpty
|
|
153
154
|
} = this.props;
|
|
154
|
-
const groupbyColumn = groupbyColumnKey &&
|
|
155
|
+
const groupbyColumn = groupbyColumnKey && TableUtils.getTableColumnByKey(selectedTable, groupbyColumnKey);
|
|
155
156
|
const {
|
|
156
157
|
type: groupbyColumnType
|
|
157
158
|
} = groupbyColumn || {};
|
|
158
|
-
return /*#__PURE__*/
|
|
159
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
159
160
|
className: "statistic-chart-parameter-item"
|
|
160
|
-
}, this.renderGroupby(),
|
|
161
|
+
}, this.renderGroupby(), DATE_COLUMN_OPTIONS.includes(groupbyColumnType) && this.renderGroupbyDateGranularity(), groupbyColumnType === CellType.GEOLOCATION && this.renderGroupbyGeolocationGranularity(), renderIncludeEmpty && renderIncludeEmpty());
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
|
-
|
|
164
|
+
export default GroupbySettings;
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
-
var _components = require("../../../components");
|
|
12
|
-
var _groupbySettings = _interopRequireDefault(require("./groupby-settings"));
|
|
13
|
-
var _summaryMethodSetting = _interopRequireDefault(require("./summary-method-setting"));
|
|
14
|
-
var _numericSummaryItem = _interopRequireDefault(require("../public-setting/numeric-summary-item"));
|
|
15
|
-
var _constants = require("../../../constants");
|
|
1
|
+
import React, { Component, Fragment } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { DTableSelect } from '../../../components';
|
|
4
|
+
import GroupbySettings from './groupby-settings';
|
|
5
|
+
import SummaryMethodSettings from './summary-method-setting';
|
|
6
|
+
import NumericSummaryItem from '../public-setting/numeric-summary-item';
|
|
7
|
+
import { GROUPBY_TYPE, STATISTICS_COUNT_SHOW, SUMMARY_METHOD, SUMMARY_TYPE } from '../../../constants';
|
|
16
8
|
const GROUP_TYPES = {
|
|
17
9
|
COUNT: 'count',
|
|
18
10
|
SINGLE_NUMERIC_COLUMN: 'single_numeric_column',
|
|
19
11
|
MULTIPLE_NUMERIC_COLUMN: 'multiple_numeric_column'
|
|
20
12
|
};
|
|
21
|
-
class GroupingSettings extends
|
|
13
|
+
class GroupingSettings extends Component {
|
|
22
14
|
constructor(props) {
|
|
23
15
|
super(props);
|
|
24
16
|
this.getSummaryMethodsOptions = () => {
|
|
25
|
-
return
|
|
17
|
+
return SUMMARY_METHOD.map(m => {
|
|
26
18
|
return {
|
|
27
19
|
value: m,
|
|
28
|
-
label: /*#__PURE__*/
|
|
20
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
29
21
|
className: 'select-module select-module-name'
|
|
30
|
-
},
|
|
22
|
+
}, intl.get(STATISTICS_COUNT_SHOW[m]))
|
|
31
23
|
};
|
|
32
24
|
});
|
|
33
25
|
};
|
|
@@ -38,7 +30,7 @@ class GroupingSettings extends _react.Component {
|
|
|
38
30
|
} = _ref;
|
|
39
31
|
if (column_groupby_multiple_numeric_column) {
|
|
40
32
|
return GROUP_TYPES.MULTIPLE_NUMERIC_COLUMN;
|
|
41
|
-
} else if (horizontal_axis_summary_type ===
|
|
33
|
+
} else if (horizontal_axis_summary_type === SUMMARY_TYPE.ADVANCED) {
|
|
42
34
|
return GROUP_TYPES.SINGLE_NUMERIC_COLUMN;
|
|
43
35
|
}
|
|
44
36
|
return GROUP_TYPES.COUNT;
|
|
@@ -46,25 +38,25 @@ class GroupingSettings extends _react.Component {
|
|
|
46
38
|
this.getGroupTypeOptions = () => {
|
|
47
39
|
return [{
|
|
48
40
|
value: GROUP_TYPES.COUNT,
|
|
49
|
-
label: /*#__PURE__*/
|
|
41
|
+
label: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
50
42
|
className: 'select-module select-module-name'
|
|
51
|
-
},
|
|
43
|
+
}, intl.get(STATISTICS_COUNT_SHOW['count'])), /*#__PURE__*/React.createElement("div", {
|
|
52
44
|
className: "summary-type-explanation"
|
|
53
|
-
},
|
|
45
|
+
}, intl.get('Count_the_number_of_records_in_each_group')))
|
|
54
46
|
}, {
|
|
55
47
|
value: GROUP_TYPES.SINGLE_NUMERIC_COLUMN,
|
|
56
|
-
label: /*#__PURE__*/
|
|
48
|
+
label: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
57
49
|
className: 'select-module select-module-name'
|
|
58
|
-
},
|
|
50
|
+
}, intl.get(STATISTICS_COUNT_SHOW['advanced'])), /*#__PURE__*/React.createElement("div", {
|
|
59
51
|
className: "summary-type-explanation"
|
|
60
|
-
},
|
|
52
|
+
}, intl.get('Compute_the_sum_maximum_or_minimum_value_of_records_in_each_group_by_a_field')))
|
|
61
53
|
}, {
|
|
62
54
|
value: GROUP_TYPES.MULTIPLE_NUMERIC_COLUMN,
|
|
63
|
-
label: /*#__PURE__*/
|
|
55
|
+
label: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
64
56
|
className: 'select-module select-module-name'
|
|
65
|
-
},
|
|
57
|
+
}, intl.get('Summarize_multiple_fields')), /*#__PURE__*/React.createElement("div", {
|
|
66
58
|
className: "summary-type-explanation"
|
|
67
|
-
},
|
|
59
|
+
}, intl.get('Compute_the_sum_maximum_or_minimum_value_of_records_in_each_group_by_multiple_fields')))
|
|
68
60
|
}];
|
|
69
61
|
};
|
|
70
62
|
this.onChangeGroupType = option => {
|
|
@@ -87,12 +79,12 @@ class GroupingSettings extends _react.Component {
|
|
|
87
79
|
if (value === GROUP_TYPES.SINGLE_NUMERIC_COLUMN) {
|
|
88
80
|
column_groupby_multiple_numeric_column = false;
|
|
89
81
|
column_groupby_numeric_columns = [];
|
|
90
|
-
horizontal_axis_summary_type =
|
|
82
|
+
horizontal_axis_summary_type = SUMMARY_TYPE.ADVANCED;
|
|
91
83
|
horizontal_axis_column_key = null;
|
|
92
84
|
column_groupby_date_granularity = null;
|
|
93
85
|
column_groupby_column_key = null;
|
|
94
86
|
column_groupby_geolocation_granularity = null;
|
|
95
|
-
horizontal_axis_summary_method =
|
|
87
|
+
horizontal_axis_summary_method = SUMMARY_METHOD[0];
|
|
96
88
|
} else if (value === GROUP_TYPES.COUNT) {
|
|
97
89
|
column_groupby_multiple_numeric_column = false;
|
|
98
90
|
column_groupby_numeric_columns = [];
|
|
@@ -104,19 +96,19 @@ class GroupingSettings extends _react.Component {
|
|
|
104
96
|
return key !== vertical_axis_column_key && (type !== 'date' || type !== 'geolocation');
|
|
105
97
|
}) || {};
|
|
106
98
|
column_groupby_column_key = groupColumn.key;
|
|
107
|
-
horizontal_axis_summary_type =
|
|
99
|
+
horizontal_axis_summary_type = SUMMARY_TYPE.COUNT;
|
|
108
100
|
horizontal_axis_column_key = null;
|
|
109
101
|
column_groupby_date_granularity = null;
|
|
110
102
|
column_groupby_geolocation_granularity = null;
|
|
111
103
|
} else if (value === GROUP_TYPES.MULTIPLE_NUMERIC_COLUMN) {
|
|
112
|
-
horizontal_axis_summary_type =
|
|
104
|
+
horizontal_axis_summary_type = SUMMARY_TYPE.ADVANCED;
|
|
113
105
|
column_groupby_multiple_numeric_column = true;
|
|
114
106
|
column_groupby_numeric_columns = [];
|
|
115
|
-
horizontal_axis_summary_type =
|
|
107
|
+
horizontal_axis_summary_type = SUMMARY_TYPE.ADVANCED;
|
|
116
108
|
horizontal_axis_column_key = this.props.numericColumnsOptions.length > 0 ? this.props.numericColumnsOptions[0].value.key : null;
|
|
117
109
|
column_groupby_date_granularity = null;
|
|
118
110
|
column_groupby_geolocation_granularity = null;
|
|
119
|
-
horizontal_axis_summary_method =
|
|
111
|
+
horizontal_axis_summary_method = SUMMARY_METHOD[0];
|
|
120
112
|
}
|
|
121
113
|
let updated = {
|
|
122
114
|
column_groupby_column_key,
|
|
@@ -145,10 +137,10 @@ class GroupingSettings extends _react.Component {
|
|
|
145
137
|
if (column_groupby_multiple_numeric_column) {
|
|
146
138
|
return this.groupTypeOptions.find(item => item.value === GROUP_TYPES.MULTIPLE_NUMERIC_COLUMN);
|
|
147
139
|
}
|
|
148
|
-
if (horizontal_axis_summary_type ===
|
|
140
|
+
if (horizontal_axis_summary_type === SUMMARY_TYPE.COUNT) {
|
|
149
141
|
return this.groupTypeOptions[0];
|
|
150
142
|
}
|
|
151
|
-
if (horizontal_axis_summary_type ===
|
|
143
|
+
if (horizontal_axis_summary_type === SUMMARY_TYPE.ADVANCED) {
|
|
152
144
|
return this.groupTypeOptions[1];
|
|
153
145
|
}
|
|
154
146
|
};
|
|
@@ -191,7 +183,7 @@ class GroupingSettings extends _react.Component {
|
|
|
191
183
|
} = statItem;
|
|
192
184
|
if (!column_groupby_numeric_columns || !Array.isArray(column_groupby_numeric_columns)) return null;
|
|
193
185
|
return column_groupby_numeric_columns.map((item, index) => {
|
|
194
|
-
return /*#__PURE__*/
|
|
186
|
+
return /*#__PURE__*/React.createElement(NumericSummaryItem, {
|
|
195
187
|
statItem: statItem,
|
|
196
188
|
key: "number-column-".concat(index),
|
|
197
189
|
numericColumnsOptions: this.props.numericColumnsOptions,
|
|
@@ -217,12 +209,12 @@ class GroupingSettings extends _react.Component {
|
|
|
217
209
|
column_groupby_numeric_columns = [...column_groupby_numeric_columns];
|
|
218
210
|
column_groupby_numeric_columns.push({
|
|
219
211
|
column_key: newNumericColumnKey,
|
|
220
|
-
summary_method:
|
|
212
|
+
summary_method: SUMMARY_METHOD[0]
|
|
221
213
|
});
|
|
222
214
|
} else {
|
|
223
215
|
column_groupby_numeric_columns = [{
|
|
224
216
|
column_key: newNumericColumnKey,
|
|
225
|
-
summary_method:
|
|
217
|
+
summary_method: SUMMARY_METHOD[0]
|
|
226
218
|
}];
|
|
227
219
|
}
|
|
228
220
|
this.props.updateStatItem(Object.assign({}, this.props.statItem, {
|
|
@@ -308,14 +300,14 @@ class GroupingSettings extends _react.Component {
|
|
|
308
300
|
column_groupby_geolocation_granularity,
|
|
309
301
|
column_groupby_multiple_numeric_column
|
|
310
302
|
} = statItem || {};
|
|
311
|
-
return /*#__PURE__*/
|
|
303
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
312
304
|
className: "statistic-chart-parameter-item"
|
|
313
|
-
}, /*#__PURE__*/
|
|
305
|
+
}, /*#__PURE__*/React.createElement("label", null, label), /*#__PURE__*/React.createElement(DTableSelect, {
|
|
314
306
|
classNamePrefix: "statistic-chart-summary-types",
|
|
315
307
|
value: selectedGroupItem,
|
|
316
308
|
onChange: this.onChangeGroupType,
|
|
317
309
|
options: this.groupTypeOptions
|
|
318
|
-
})), horizontal_axis_summary_type ===
|
|
310
|
+
})), horizontal_axis_summary_type === SUMMARY_TYPE.ADVANCED && (column_groupby_multiple_numeric_column ? /*#__PURE__*/React.createElement(NumericSummaryItem, {
|
|
319
311
|
statItem: statItem,
|
|
320
312
|
index: 0,
|
|
321
313
|
key: "number-column-".concat(0),
|
|
@@ -327,7 +319,7 @@ class GroupingSettings extends _react.Component {
|
|
|
327
319
|
},
|
|
328
320
|
onChangeColumnOption: this.onChangeGroupbyNumericColumn,
|
|
329
321
|
onChangeSummaryMethod: this.onChangeSummaryMethod
|
|
330
|
-
}) : /*#__PURE__*/
|
|
322
|
+
}) : /*#__PURE__*/React.createElement(SummaryMethodSettings, {
|
|
331
323
|
statItem: statItem,
|
|
332
324
|
numericColumnsOptions: numericColumnsOptions,
|
|
333
325
|
summaryType: horizontal_axis_summary_type,
|
|
@@ -338,29 +330,29 @@ class GroupingSettings extends _react.Component {
|
|
|
338
330
|
onSelectSummaryMethod: this.updateSummaryMethod,
|
|
339
331
|
onSelectNumericColumn: this.updateSummaryColumn,
|
|
340
332
|
updateStatItem: this.props.updateStatItem
|
|
341
|
-
})), column_groupby_multiple_numeric_column && /*#__PURE__*/
|
|
333
|
+
})), column_groupby_multiple_numeric_column && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
342
334
|
className: "statistics-add-number"
|
|
343
|
-
}, this.renderGroupbyNumericColumns()), Array.isArray(numericColumnsOptions) && numericColumnsOptions.length > 0 && /*#__PURE__*/
|
|
335
|
+
}, this.renderGroupbyNumericColumns()), Array.isArray(numericColumnsOptions) && numericColumnsOptions.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
344
336
|
className: "statistics-add-number-column",
|
|
345
337
|
onClick: this.onAddNumericColumn
|
|
346
|
-
}, /*#__PURE__*/
|
|
338
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
347
339
|
className: "number-column-item dtable-font dtable-icon-add-table"
|
|
348
|
-
}), /*#__PURE__*/
|
|
340
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
349
341
|
className: "number-column-item add-number-column-description"
|
|
350
|
-
},
|
|
342
|
+
}, intl.get('Add_new_numeric_column')))), (!column_groupby_multiple_numeric_column && horizontal_axis_summary_type === SUMMARY_TYPE.ADVANCED || horizontal_axis_summary_type === SUMMARY_TYPE.COUNT) && /*#__PURE__*/React.createElement(GroupbySettings, {
|
|
351
343
|
selectedTable: selectedTable,
|
|
352
344
|
columnsOptions: columnGroupbyColumnsOptions,
|
|
353
345
|
dateGranularityOptions: dateGranularityOptions,
|
|
354
346
|
geolocationGranularityOptions: geolocationGranularityOptions,
|
|
355
|
-
label:
|
|
347
|
+
label: intl.get('Group_by'),
|
|
356
348
|
groupbyColumnKey: column_groupby_column_key,
|
|
357
349
|
groupbyDateGranularity: column_groupby_date_granularity,
|
|
358
350
|
groupbyGeolocationGranularity: column_groupby_geolocation_granularity,
|
|
359
351
|
getSelectedColumnOption: this.props.getSelectedColumnOption,
|
|
360
|
-
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this,
|
|
361
|
-
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this,
|
|
362
|
-
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this,
|
|
352
|
+
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this, GROUPBY_TYPE.COLUMN),
|
|
353
|
+
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this, GROUPBY_TYPE.COLUMN),
|
|
354
|
+
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this, GROUPBY_TYPE.COLUMN)
|
|
363
355
|
}));
|
|
364
356
|
}
|
|
365
357
|
}
|
|
366
|
-
|
|
358
|
+
export default GroupingSettings;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
-
var _baseSettings = _interopRequireDefault(require("../public-setting/base-settings"));
|
|
12
|
-
var _horizontalBarChartStyle = _interopRequireDefault(require("./style-setting/horizontal-bar-chart-style"));
|
|
13
|
-
var _groupbySettings = _interopRequireDefault(require("./groupby-settings"));
|
|
14
|
-
var _summarySettings = _interopRequireDefault(require("./summary-settings"));
|
|
15
|
-
var _dataSortSetting = _interopRequireDefault(require("../public-setting/data-sort-setting"));
|
|
16
|
-
var _constants = require("../../../constants");
|
|
17
|
-
class BarSettings extends _react.Component {
|
|
1
|
+
import React, { Component, Fragment } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import BaseSettings from '../public-setting/base-settings';
|
|
4
|
+
import HorizontalBarChartStyle from './style-setting/horizontal-bar-chart-style';
|
|
5
|
+
import GroupbySettings from './groupby-settings';
|
|
6
|
+
import SummarySettings from './summary-settings';
|
|
7
|
+
import DataSort from '../public-setting/data-sort-setting';
|
|
8
|
+
import { GROUPBY_TYPE } from '../../../constants';
|
|
9
|
+
class BarSettings extends Component {
|
|
18
10
|
constructor() {
|
|
19
11
|
super(...arguments);
|
|
20
12
|
this.onSelectGroupbyColumn = (type, groupbyColumnKey, groupbyDateGranularity, groupbyGeolocationGranularity) => {
|
|
@@ -85,7 +77,7 @@ class BarSettings extends _react.Component {
|
|
|
85
77
|
horizontal_axis_summary_method
|
|
86
78
|
} = statItem || {};
|
|
87
79
|
if (settingType === 'style') {
|
|
88
|
-
return /*#__PURE__*/
|
|
80
|
+
return /*#__PURE__*/React.createElement(HorizontalBarChartStyle, {
|
|
89
81
|
statItem: statItem,
|
|
90
82
|
labelColorConfigs: labelColorConfigs,
|
|
91
83
|
eventBus: eventBus,
|
|
@@ -93,7 +85,7 @@ class BarSettings extends _react.Component {
|
|
|
93
85
|
updateStatItem: this.props.updateStatItem
|
|
94
86
|
});
|
|
95
87
|
}
|
|
96
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseSettings, {
|
|
97
89
|
statItem: statItem,
|
|
98
90
|
selectedTableId: selectedTableId,
|
|
99
91
|
selectedViewId: selectedViewId,
|
|
@@ -102,27 +94,27 @@ class BarSettings extends _react.Component {
|
|
|
102
94
|
getTableById: this.props.getTableById,
|
|
103
95
|
getConvertedChart: this.props.getConvertedChart,
|
|
104
96
|
updateStatItem: this.props.updateStatItem
|
|
105
|
-
}), /*#__PURE__*/
|
|
97
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
106
98
|
className: "statistic-chart-parameter-divider"
|
|
107
|
-
}), /*#__PURE__*/
|
|
99
|
+
}), /*#__PURE__*/React.createElement(GroupbySettings, {
|
|
108
100
|
selectedTable: selectedTable,
|
|
109
101
|
columnsOptions: generalColumnsOptions,
|
|
110
102
|
dateGranularityOptions: dateGranularityOptions,
|
|
111
103
|
geolocationGranularityOptions: geolocationGranularityOptions,
|
|
112
|
-
label:
|
|
104
|
+
label: intl.get('Vertical_axis'),
|
|
113
105
|
groupbyColumnKey: vertical_axis_column_key,
|
|
114
106
|
groupbyDateGranularity: vertical_axis_date_granularity,
|
|
115
107
|
groupbyGeolocationGranularity: vertical_axis_geolocation_granularity,
|
|
116
108
|
getSelectedColumnOption: this.props.getSelectedColumnOption,
|
|
117
|
-
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this,
|
|
118
|
-
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this,
|
|
119
|
-
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this,
|
|
109
|
+
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this, GROUPBY_TYPE.ROW),
|
|
110
|
+
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this, GROUPBY_TYPE.ROW),
|
|
111
|
+
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this, GROUPBY_TYPE.ROW),
|
|
120
112
|
renderIncludeEmpty: renderIncludeEmpty
|
|
121
|
-
}), /*#__PURE__*/
|
|
113
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
122
114
|
className: "statistic-chart-parameter-divider"
|
|
123
|
-
}), /*#__PURE__*/
|
|
115
|
+
}), /*#__PURE__*/React.createElement(SummarySettings, {
|
|
124
116
|
statItem: statItem,
|
|
125
|
-
label:
|
|
117
|
+
label: intl.get('Horizontal_axis'),
|
|
126
118
|
numericColumnsOptions: numericColumnsOptions,
|
|
127
119
|
summaryType: horizontal_axis_summary_type,
|
|
128
120
|
summaryColumnKey: horizontal_axis_column_key,
|
|
@@ -131,12 +123,12 @@ class BarSettings extends _react.Component {
|
|
|
131
123
|
onChangeSummaryType: this.updatedSummaryType,
|
|
132
124
|
onSelectNumericColumn: this.updateSummaryColumn,
|
|
133
125
|
onSelectSummaryMethod: this.updateSummaryMethod
|
|
134
|
-
}), /*#__PURE__*/
|
|
126
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
135
127
|
className: "statistic-chart-parameter-divider"
|
|
136
|
-
}), /*#__PURE__*/
|
|
128
|
+
}), /*#__PURE__*/React.createElement(DataSort, {
|
|
137
129
|
statItem: statItem,
|
|
138
130
|
updateStatItem: this.props.updateStatItem
|
|
139
131
|
}));
|
|
140
132
|
}
|
|
141
133
|
}
|
|
142
|
-
|
|
134
|
+
export default BarSettings;
|
package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
-
var _baseSettings = _interopRequireDefault(require("../public-setting/base-settings"));
|
|
12
|
-
var _horizontalBarChartStyle = _interopRequireDefault(require("./style-setting/horizontal-bar-chart-style"));
|
|
13
|
-
var _groupbySettings = _interopRequireDefault(require("./groupby-settings"));
|
|
14
|
-
var _horizontalAxisGroupSettings = _interopRequireDefault(require("./horizontal-axis-group-settings"));
|
|
15
|
-
var _dataSortSetting = _interopRequireDefault(require("../public-setting/data-sort-setting"));
|
|
16
|
-
var _constants = require("../../../constants");
|
|
17
|
-
class HorizontalGroupBarChartSettings extends _react.Component {
|
|
1
|
+
import React, { Component, Fragment } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import BaseSettings from '../public-setting/base-settings';
|
|
4
|
+
import HorizontalBarChartStyle from './style-setting/horizontal-bar-chart-style';
|
|
5
|
+
import GroupbySettings from './groupby-settings';
|
|
6
|
+
import HorizontalAxisGroupSettings from './horizontal-axis-group-settings';
|
|
7
|
+
import DataSort from '../public-setting/data-sort-setting';
|
|
8
|
+
import { GROUPBY_TYPE, STAT_TYPE } from '../../../constants';
|
|
9
|
+
class HorizontalGroupBarChartSettings extends Component {
|
|
18
10
|
constructor() {
|
|
19
11
|
super(...arguments);
|
|
20
12
|
this.onSelectGroupbyColumn = (type, groupbyColumnKey, groupbyDateGranularity, groupbyGeolocationGranularity) => {
|
|
@@ -86,7 +78,7 @@ class HorizontalGroupBarChartSettings extends _react.Component {
|
|
|
86
78
|
horizontal_axis_summary_method
|
|
87
79
|
} = statItem || {};
|
|
88
80
|
if (settingType === 'style') {
|
|
89
|
-
return /*#__PURE__*/
|
|
81
|
+
return /*#__PURE__*/React.createElement(HorizontalBarChartStyle, {
|
|
90
82
|
statItem: statItem,
|
|
91
83
|
labelColorConfigs: labelColorConfigs,
|
|
92
84
|
eventBus: eventBus,
|
|
@@ -94,7 +86,7 @@ class HorizontalGroupBarChartSettings extends _react.Component {
|
|
|
94
86
|
updateStatItem: this.props.updateStatItem
|
|
95
87
|
});
|
|
96
88
|
}
|
|
97
|
-
return /*#__PURE__*/
|
|
89
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseSettings, {
|
|
98
90
|
statItem: statItem,
|
|
99
91
|
selectedTableId: selectedTableId,
|
|
100
92
|
selectedViewId: selectedViewId,
|
|
@@ -103,26 +95,26 @@ class HorizontalGroupBarChartSettings extends _react.Component {
|
|
|
103
95
|
getTableById: this.props.getTableById,
|
|
104
96
|
getConvertedChart: this.props.getConvertedChart,
|
|
105
97
|
updateStatItem: this.props.updateStatItem
|
|
106
|
-
}), /*#__PURE__*/
|
|
98
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
107
99
|
className: "statistic-chart-parameter-divider"
|
|
108
|
-
}), /*#__PURE__*/
|
|
100
|
+
}), /*#__PURE__*/React.createElement(GroupbySettings, {
|
|
109
101
|
selectedTable: selectedTable,
|
|
110
102
|
columnsOptions: generalColumnsOptions,
|
|
111
103
|
dateGranularityOptions: dateGranularityOptions,
|
|
112
104
|
geolocationGranularityOptions: geolocationGranularityOptions,
|
|
113
|
-
label:
|
|
105
|
+
label: intl.get('Vertical_axis'),
|
|
114
106
|
groupbyColumnKey: vertical_axis_column_key,
|
|
115
107
|
groupbyDateGranularity: vertical_axis_date_granularity,
|
|
116
108
|
groupbyGeolocationGranularity: vertical_axis_geolocation_granularity,
|
|
117
109
|
getSelectedColumnOption: this.props.getSelectedColumnOption,
|
|
118
|
-
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this,
|
|
119
|
-
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this,
|
|
120
|
-
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this,
|
|
110
|
+
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this, GROUPBY_TYPE.ROW),
|
|
111
|
+
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this, GROUPBY_TYPE.ROW),
|
|
112
|
+
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this, GROUPBY_TYPE.ROW),
|
|
121
113
|
renderIncludeEmpty: renderIncludeEmpty
|
|
122
|
-
}), /*#__PURE__*/
|
|
114
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
123
115
|
className: "statistic-chart-parameter-divider"
|
|
124
|
-
}), /*#__PURE__*/
|
|
125
|
-
label:
|
|
116
|
+
}), /*#__PURE__*/React.createElement(HorizontalAxisGroupSettings, {
|
|
117
|
+
label: intl.get('Horizontal_axis'),
|
|
126
118
|
statItem: statItem,
|
|
127
119
|
selectedTable: selectedTable,
|
|
128
120
|
summaryType: horizontal_axis_summary_type,
|
|
@@ -134,17 +126,17 @@ class HorizontalGroupBarChartSettings extends _react.Component {
|
|
|
134
126
|
numericColumnsOptions: numericColumnsOptions,
|
|
135
127
|
getSelectedColumnOption: this.props.getSelectedColumnOption,
|
|
136
128
|
onChangeColumnGroupbyType: this.updateColumnGroupbys,
|
|
137
|
-
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this,
|
|
138
|
-
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this,
|
|
139
|
-
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this,
|
|
129
|
+
onSelectGroupbyColumn: this.onSelectGroupbyColumn.bind(this, GROUPBY_TYPE.COLUMN),
|
|
130
|
+
onSelectGroupbyDateGranularity: this.onSelectGroupbyDateGranularity.bind(this, GROUPBY_TYPE.COLUMN),
|
|
131
|
+
onSelectGroupbyGeolocationGranularity: this.onSelectGroupbyGeolocationGranularity.bind(this, GROUPBY_TYPE.COLUMN),
|
|
140
132
|
updatedColumnGroupbyNumericColumns: this.updatedColumnGroupbyNumericColumns,
|
|
141
133
|
updateStatItem: this.props.updateStatItem
|
|
142
|
-
}), statItem.type ===
|
|
134
|
+
}), statItem.type === STAT_TYPE.STACKED_HORIZONTAL_BAR && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
143
135
|
className: "statistic-chart-parameter-divider"
|
|
144
|
-
}), /*#__PURE__*/
|
|
136
|
+
}), /*#__PURE__*/React.createElement(DataSort, {
|
|
145
137
|
statItem: statItem,
|
|
146
138
|
updateStatItem: this.props.updateStatItem
|
|
147
139
|
})));
|
|
148
140
|
}
|
|
149
141
|
}
|
|
150
|
-
|
|
142
|
+
export default HorizontalGroupBarChartSettings;
|