sea-chart 2.0.36 → 2.0.38
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/dist/api/index.js +8 -15
- package/dist/components/cell-factory/FormatterConfig.js +55 -62
- package/dist/components/cell-factory/SimpleCellFormatter.js +5 -12
- package/dist/components/cell-factory/SingleSelectOption.js +11 -18
- package/dist/components/cell-factory/cell-editor-factory.js +5 -12
- package/dist/components/cell-factory/cell-formatter-factory.js +4 -11
- package/dist/components/cell-factory/link-content.js +30 -38
- package/dist/components/chart-color-selector/color-selector.js +11 -18
- package/dist/components/collaborator/index.js +7 -14
- package/dist/components/color-picker/index.js +12 -19
- package/dist/components/color-popover/color-rules/color-rule.js +26 -34
- package/dist/components/color-popover/color-rules/index.js +7 -15
- package/dist/components/color-popover/color-rules/rule-filters/filter.js +27 -34
- package/dist/components/color-popover/color-rules/rule-filters/index.js +17 -25
- package/dist/components/color-popover/color-rules/rule-filters/number-input.js +9 -17
- package/dist/components/color-popover/color-rules-popover.js +30 -38
- package/dist/components/color-popover/color-selector-popover.js +12 -20
- package/dist/components/color-setting/color-group-selector.js +13 -21
- package/dist/components/common-add-tool/index.js +8 -15
- package/dist/components/data-process-setter/data-setting-header.js +7 -14
- package/dist/components/data-process-setter/hide-column-setter.js +13 -20
- package/dist/components/data-process-setter/index.js +4 -27
- package/dist/components/data-process-setter/sort-setter.js +18 -26
- package/dist/components/draggable/Draggable.js +7 -13
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +40 -48
- package/dist/components/drill-down-settings/drill-down-fields-settings/index.js +10 -18
- package/dist/components/drill-down-settings/index.js +11 -18
- package/dist/components/dtable-popover/index.js +13 -20
- package/dist/components/dtable-search-input/index.js +13 -21
- package/dist/components/font-settings/index.js +14 -22
- package/dist/components/goal-line-setting/goal-setting-item.js +6 -14
- package/dist/components/goal-line-setting/index.js +12 -19
- package/dist/components/highlighter/highlighter.js +7 -14
- package/dist/components/icon/index.js +5 -12
- package/dist/components/index.js +7 -48
- package/dist/components/loading/index.js +6 -13
- package/dist/components/number-input/index.js +4 -11
- package/dist/components/pixel-editor/index.js +15 -23
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +8 -15
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +26 -34
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +9 -18
- package/dist/components/popover/sort-popover/sort-popover.js +55 -65
- package/dist/components/resize-handle/ResizeHandle.js +6 -13
- package/dist/components/row-card/row-card-header-cell.js +17 -24
- package/dist/components/row-card/row-card-header.js +15 -22
- package/dist/components/row-card/row-card-item.js +35 -43
- package/dist/components/row-card/row-card.js +17 -25
- package/dist/components/statistic-record-dialog/index.js +56 -64
- package/dist/components/tooltip/index.js +14 -21
- package/dist/components/types-dialog/index.js +62 -70
- package/dist/components/types-dialog/use-force-update.js +4 -10
- package/dist/constants/color-rules.js +8 -14
- package/dist/constants/common-constants.js +8 -14
- package/dist/constants/error.js +2 -8
- package/dist/constants/geolocation.js +9 -15
- package/dist/constants/index.js +142 -271
- package/dist/constants/key-codes.js +0 -2
- package/dist/constants/model.js +3 -9
- package/dist/constants/regions.js +3 -8
- package/dist/constants/style.js +6 -12
- package/dist/constants/table.js +1 -7
- package/dist/constants/type-image.js +33 -39
- package/dist/constants/type.js +3 -9
- package/dist/context.js +13 -20
- package/dist/editor/index.js +8 -15
- package/dist/index.js +13 -104
- package/dist/intl.js +10 -17
- package/dist/locale/index.js +16 -23
- package/dist/locale/lang/de.js +1 -7
- package/dist/locale/lang/en.js +1 -7
- package/dist/locale/lang/es.js +1 -7
- package/dist/locale/lang/fr.js +1 -7
- package/dist/locale/lang/pt.js +1 -7
- package/dist/locale/lang/ru.js +1 -7
- package/dist/locale/lang/zh_CN.js +1 -7
- package/dist/model/area-group.js +12 -19
- package/dist/model/area.js +12 -19
- package/dist/model/bar-custom.js +11 -18
- package/dist/model/bar-group.js +12 -19
- package/dist/model/bar-stack.js +10 -17
- package/dist/model/bar.js +11 -18
- package/dist/model/base-model.js +4 -11
- package/dist/model/basic-number-card.js +13 -20
- package/dist/model/chart.js +7 -13
- package/dist/model/combination.js +15 -22
- package/dist/model/compare-bar.js +14 -21
- package/dist/model/completeness-group.js +11 -18
- package/dist/model/completeness.js +10 -17
- package/dist/model/dashboard.js +7 -14
- package/dist/model/funnel.js +14 -21
- package/dist/model/generic-model.js +135 -143
- package/dist/model/heat-map.js +9 -16
- package/dist/model/horizontal-bar.js +11 -18
- package/dist/model/horizontal-group-bar.js +10 -17
- package/dist/model/index.js +69 -93
- package/dist/model/line-group.js +13 -20
- package/dist/model/line.js +12 -19
- package/dist/model/map-bubble.js +12 -19
- package/dist/model/map.js +12 -19
- package/dist/model/mirror.js +13 -20
- package/dist/model/pie.js +12 -19
- package/dist/model/ring.js +12 -19
- package/dist/model/scatter.js +10 -17
- package/dist/model/stacked-horizontal-bar.js +11 -18
- package/dist/model/table-element.js +5 -12
- package/dist/model/table.js +7 -14
- package/dist/model/tree-map.js +7 -14
- package/dist/model/trend.js +11 -18
- package/dist/model/user.js +1 -7
- package/dist/model/world-map-bubble.js +12 -19
- package/dist/model/world-map.js +12 -19
- package/dist/services/map-json.js +11 -17
- package/dist/settings/advance-bar-settings/data-settings.js +36 -44
- package/dist/settings/advance-bar-settings/index.js +3 -20
- package/dist/settings/advance-bar-settings/style-settings.js +63 -71
- package/dist/settings/bar-settings/data-settings.js +39 -47
- package/dist/settings/bar-settings/index.js +3 -20
- package/dist/settings/bar-settings/style-settings.js +49 -57
- package/dist/settings/basic-number-card/data-settings.js +49 -57
- package/dist/settings/basic-number-card/index.js +3 -20
- package/dist/settings/basic-number-card/style-settings.js +19 -27
- package/dist/settings/combination-settings/data-settings.js +55 -63
- package/dist/settings/combination-settings/index.js +3 -20
- package/dist/settings/combination-settings/style-settings.js +65 -73
- package/dist/settings/completeness-settings/callbacks/callbacks.js +16 -27
- package/dist/settings/completeness-settings/data-settings/completion-settings.js +21 -28
- package/dist/settings/completeness-settings/data-settings/data-settings.js +25 -32
- package/dist/settings/completeness-settings/index.js +3 -20
- package/dist/settings/completeness-settings/style-settings.js +19 -26
- package/dist/settings/dashboard-settings/data-settings.js +43 -51
- package/dist/settings/dashboard-settings/index.js +2 -13
- package/dist/settings/data-settings.js +72 -79
- package/dist/settings/funnel-settings/components/dnd-item/dnd-item.js +12 -19
- package/dist/settings/funnel-settings/components/dnd-list.js +15 -23
- package/dist/settings/funnel-settings/components/funnel-label-setting.js +32 -40
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +20 -28
- package/dist/settings/funnel-settings/data-settings.js +23 -31
- package/dist/settings/funnel-settings/index.js +3 -20
- package/dist/settings/funnel-settings/style-settings.js +11 -19
- package/dist/settings/heat-map-settings/data-settings.js +18 -26
- package/dist/settings/heat-map-settings/index.js +3 -20
- package/dist/settings/heat-map-settings/style-settings.js +18 -26
- package/dist/settings/horizontal-bar-settings/data-settings.js +12 -19
- package/dist/settings/horizontal-bar-settings/index.js +3 -20
- package/dist/settings/horizontal-bar-settings/style-settings.js +12 -19
- package/dist/settings/index.js +52 -70
- package/dist/settings/map-settings/components/location-field-selector.js +10 -17
- package/dist/settings/map-settings/components/map-level-selector.js +11 -18
- package/dist/settings/map-settings/components/map-province-city-selector.js +19 -26
- package/dist/settings/map-settings/index.js +3 -20
- package/dist/settings/map-settings/map-data-settings.js +23 -30
- package/dist/settings/map-settings/map-style-settings.js +27 -35
- package/dist/settings/mirror-settings/data-settings.js +26 -34
- package/dist/settings/mirror-settings/index.js +2 -13
- package/dist/settings/pie-settings/data-settings.js +33 -41
- package/dist/settings/pie-settings/index.js +3 -20
- package/dist/settings/pie-settings/style-settings.js +47 -55
- package/dist/settings/scatter/data-settings.js +27 -34
- package/dist/settings/scatter/index.js +3 -12
- package/dist/settings/stacks-settings/index.js +19 -27
- package/dist/settings/stacks-settings/stack-item-settings.js +19 -27
- package/dist/settings/style-settings.js +65 -73
- package/dist/settings/table-element-settings/components/data-filter.js +30 -38
- package/dist/settings/table-element-settings/data-settings.js +21 -29
- package/dist/settings/table-element-settings/index.js +2 -13
- package/dist/settings/table-settings/data-settings.js +112 -120
- package/dist/settings/table-settings/index.js +2 -13
- package/dist/settings/time-comparison-settings/data-settings.js +43 -51
- package/dist/settings/time-comparison-settings/index.js +3 -20
- package/dist/settings/time-comparison-settings/style-settings.js +42 -50
- package/dist/settings/trend-settings/data-settings.js +24 -32
- package/dist/settings/trend-settings/index.js +3 -20
- package/dist/settings/trend-settings/style-setting.js +19 -27
- package/dist/settings/widgets/basic-summary/index.js +55 -63
- package/dist/settings/widgets/chart-type/index.js +18 -26
- package/dist/settings/widgets/color-settings/index.js +72 -80
- package/dist/settings/widgets/common-data-settings.js +21 -29
- package/dist/settings/widgets/data-filter/index.js +35 -43
- package/dist/settings/widgets/data-sort.js +16 -24
- package/dist/settings/widgets/date-summary-item.js +26 -34
- package/dist/settings/widgets/display-values-settings/index.js +14 -22
- package/dist/settings/widgets/divider/index.js +8 -16
- package/dist/settings/widgets/font-settings/font-color-settings.js +11 -19
- package/dist/settings/widgets/font-settings/font-size-settings.js +14 -22
- package/dist/settings/widgets/font-settings/font-weight-settings.js +17 -25
- package/dist/settings/widgets/font-settings/index.js +4 -27
- package/dist/settings/widgets/group-by.js +51 -59
- package/dist/settings/widgets/min-max-setting.js +10 -18
- package/dist/settings/widgets/mininum-slice-percent.js +10 -18
- package/dist/settings/widgets/numeric-summary-item.js +25 -33
- package/dist/settings/widgets/select-line-type/index.js +10 -17
- package/dist/settings/widgets/select-table/index.js +9 -16
- package/dist/settings/widgets/select-view/index.js +20 -28
- package/dist/settings/widgets/stack.js +14 -22
- package/dist/settings/widgets/summary-method-setting.js +17 -25
- package/dist/settings/widgets/summary-settings.js +74 -82
- package/dist/settings/widgets/switch/index.js +9 -16
- package/dist/settings/widgets/text-horizontal-settings.js +15 -23
- package/dist/settings/widgets/time-picker.js +29 -37
- package/dist/settings/widgets/title-settings/index.js +29 -37
- package/dist/settings/widgets/title-settings/title-text.js +5 -12
- package/dist/settings/widgets/x-axios.js +0 -1
- package/dist/settings/widgets/y-axis-group-settings.js +64 -72
- package/dist/utils/cell-format-utils.js +17 -27
- package/dist/utils/cell-value-utils.js +4 -11
- package/dist/utils/chart-utils/base-utils.js +324 -332
- package/dist/utils/chart-utils/index.js +28 -41
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +77 -84
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +13 -20
- package/dist/utils/chart-utils/original-data-utils/combination-calculator.js +45 -52
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +21 -28
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +33 -40
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +16 -23
- package/dist/utils/chart-utils/original-data-utils/index.js +50 -57
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +19 -26
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +90 -96
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +19 -26
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +31 -38
- package/dist/utils/chart-utils/sql-statistics-utils.js +229 -237
- package/dist/utils/chart.js +9 -17
- package/dist/utils/collaborator-manager.js +3 -9
- package/dist/utils/collaborator-utils.js +19 -31
- package/dist/utils/collaborator.js +6 -15
- package/dist/utils/color-utils.js +18 -29
- package/dist/utils/column-utils.js +77 -104
- package/dist/utils/common-utils.js +28 -53
- package/dist/utils/concurrency-manager.js +1 -7
- package/dist/utils/contexts.js +5 -12
- package/dist/utils/date-translate.js +12 -20
- package/dist/utils/digital-sign-utils.js +7 -14
- package/dist/utils/event-bus.js +1 -7
- package/dist/utils/hotkey.js +5 -11
- package/dist/utils/index.js +54 -221
- package/dist/utils/key-generator.js +2 -9
- package/dist/utils/map.js +22 -31
- package/dist/utils/object-utils.js +2 -8
- package/dist/utils/options-utils.js +10 -18
- package/dist/utils/row-record-utils.js +166 -178
- package/dist/utils/row-utils.js +27 -38
- package/dist/utils/search.js +24 -32
- package/dist/utils/sql/chart-data-sql.js +106 -112
- package/dist/utils/sql/column-2-sql-column.js +158 -168
- package/dist/utils/sql/index.js +3 -27
- package/dist/utils/trend-utils.js +39 -47
- package/dist/view/index.js +90 -96
- package/dist/view/title/index.js +16 -24
- package/dist/view/wrapper/area-group.js +45 -53
- package/dist/view/wrapper/area.js +43 -51
- package/dist/view/wrapper/bar-compare.js +38 -46
- package/dist/view/wrapper/bar-custom-stack.js +39 -47
- package/dist/view/wrapper/bar-group.js +45 -53
- package/dist/view/wrapper/bar-stack.js +48 -56
- package/dist/view/wrapper/bar.js +40 -48
- package/dist/view/wrapper/basic-number-card.js +26 -34
- package/dist/view/wrapper/chart-component.js +123 -131
- package/dist/view/wrapper/combination.js +55 -63
- package/dist/view/wrapper/completeness-group.js +40 -48
- package/dist/view/wrapper/completeness.js +36 -44
- package/dist/view/wrapper/dashboard.js +39 -44
- package/dist/view/wrapper/funnel.js +40 -43
- package/dist/view/wrapper/heat-map.js +62 -70
- package/dist/view/wrapper/horizontal-bar-group.js +52 -60
- package/dist/view/wrapper/horizontal-bar-stack.js +47 -55
- package/dist/view/wrapper/horizontal-bar.js +41 -49
- package/dist/view/wrapper/index.js +107 -115
- package/dist/view/wrapper/line-group.js +43 -51
- package/dist/view/wrapper/line.js +42 -50
- package/dist/view/wrapper/map-bubble.js +40 -48
- package/dist/view/wrapper/map-world-bubble.js +39 -47
- package/dist/view/wrapper/map-world.js +41 -49
- package/dist/view/wrapper/map.js +42 -50
- package/dist/view/wrapper/mirror.js +41 -49
- package/dist/view/wrapper/pie.js +44 -52
- package/dist/view/wrapper/ring.js +49 -57
- package/dist/view/wrapper/scatter.js +42 -50
- package/dist/view/wrapper/table/index.js +14 -22
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +49 -57
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +53 -61
- package/dist/view/wrapper/table/pivot-table-display-name.js +82 -90
- package/dist/view/wrapper/table/two-dimension-table.js +85 -93
- package/dist/view/wrapper/table-element/components/dataset-utils.js +23 -36
- package/dist/view/wrapper/table-element/components/formatter.js +90 -99
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +23 -32
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +90 -97
- package/dist/view/wrapper/table-element/components/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/link-formatter.js +90 -97
- package/dist/view/wrapper/table-element/components/record.js +13 -20
- package/dist/view/wrapper/table-element/components/records-body.js +9 -17
- package/dist/view/wrapper/table-element/components/records-header/index.js +7 -15
- package/dist/view/wrapper/table-element/components/records-header/records-header-cell.js +8 -16
- package/dist/view/wrapper/table-element/components/records.js +25 -33
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +5 -12
- package/dist/view/wrapper/table-element/components/utils.js +6 -16
- package/dist/view/wrapper/table-element/components/value-display-utils.js +4 -11
- package/dist/view/wrapper/table-element/components/vertical-scrollbar/index.js +6 -13
- package/dist/view/wrapper/table-element/index.js +18 -26
- package/dist/view/wrapper/treemap.js +38 -46
- package/dist/view/wrapper/trend.js +58 -66
- package/package.json +5 -5
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var d3 = _interopRequireWildcard(require("d3"));
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
16
|
-
var _constants = require("../../constants");
|
|
17
|
-
var _utils = require("../../utils");
|
|
18
|
-
var _tooltip = _interopRequireDefault(require("../../components/tooltip"));
|
|
19
|
-
var _chartComponent = _interopRequireDefault(require("./chart-component"));
|
|
20
|
-
class Combination extends _chartComponent.default {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { getTableColumnByKey, getTableById } from 'dtable-utils';
|
|
4
|
+
import { debounce } from 'lodash-es';
|
|
5
|
+
import * as d3 from 'd3';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import intl from '../../intl';
|
|
8
|
+
import { EMPTY_NAME, CHART_THEME_COLOR, CHART_LINE_TYPES } from '../../constants';
|
|
9
|
+
import { BaseUtils, isFunction } from '../../utils';
|
|
10
|
+
import ToolTip from '../../components/tooltip';
|
|
11
|
+
import ChartComponent from './chart-component';
|
|
12
|
+
class Combination extends ChartComponent {
|
|
21
13
|
constructor(props) {
|
|
22
14
|
super(props);
|
|
23
15
|
this.handleResize = () => {
|
|
@@ -52,11 +44,11 @@ class Combination extends _chartComponent.default {
|
|
|
52
44
|
let {
|
|
53
45
|
result: data
|
|
54
46
|
} = this.props;
|
|
55
|
-
data =
|
|
47
|
+
data = BaseUtils.formatEmptyName(data, '', intl.get('Empty'));
|
|
56
48
|
if (!Array.isArray(data)) return;
|
|
57
49
|
this.draw(data);
|
|
58
50
|
this.renderAxisLabel(this.props.chart, this.props.tables, this.container);
|
|
59
|
-
|
|
51
|
+
isFunction(customRender) && customRender(this.chart);
|
|
60
52
|
};
|
|
61
53
|
this.draw = data => {
|
|
62
54
|
const {
|
|
@@ -65,8 +57,8 @@ class Combination extends _chartComponent.default {
|
|
|
65
57
|
tables,
|
|
66
58
|
chartColorTheme
|
|
67
59
|
} = this.props;
|
|
68
|
-
const theme =
|
|
69
|
-
const currentTheme =
|
|
60
|
+
const theme = CHART_THEME_COLOR[globalTheme];
|
|
61
|
+
const currentTheme = BaseUtils.getCurrentTheme(chartColorTheme);
|
|
70
62
|
const {
|
|
71
63
|
display_goal_line,
|
|
72
64
|
goal_value,
|
|
@@ -96,9 +88,9 @@ class Combination extends _chartComponent.default {
|
|
|
96
88
|
display_data_field,
|
|
97
89
|
label_font_size
|
|
98
90
|
} = chart.config;
|
|
99
|
-
const table =
|
|
100
|
-
const leftSummaryColumn =
|
|
101
|
-
const rightSummaryColumn =
|
|
91
|
+
const table = getTableById(tables, table_id);
|
|
92
|
+
const leftSummaryColumn = getTableColumnByKey(table, y_axis_left_summary_column) || {};
|
|
93
|
+
const rightSummaryColumn = getTableColumnByKey(table, y_axis_right_summary_column) || {};
|
|
102
94
|
const leftTitle = this.getTitle(tables, table_id, y_axis_left_summary_type, y_axis_left_summary_column);
|
|
103
95
|
const rightTitle = this.getTitle(tables, table_id, y_axis_right_summary_type, y_axis_right_summary_column);
|
|
104
96
|
const showLeftValue = display_data && this.valueFieldMap['value_left'].includes(display_data_field);
|
|
@@ -112,7 +104,7 @@ class Combination extends _chartComponent.default {
|
|
|
112
104
|
const rightY = d3.scaleLinear().domain(y_axis_auto_range_right ? [d3.min(data, d => d.value_right), rightNiceEnd] : [y_axis_min_right, y_axis_max_right]).range([chartHeight - insertPadding, insertPadding + marginTop]);
|
|
113
105
|
|
|
114
106
|
// Y axis (right)
|
|
115
|
-
const rightAxisWrapper = this.chart.append('g').attr('class', 'y-axis-wrapper-right').attr('transform',
|
|
107
|
+
const rightAxisWrapper = this.chart.append('g').attr('class', 'y-axis-wrapper-right').attr('transform', `translate(${chartWidth - insertPadding},0)`).call(d3.axisRight(rightY).tickSizeInner(0).ticks(5).tickFormat(d => BaseUtils.getSummaryValueDisplayString(rightSummaryColumn, d, y_axis_right_summary_column))).call(g => {
|
|
116
108
|
g.select('.domain').remove();
|
|
117
109
|
g.selectAll('text').attr('font-size', theme.fontSize);
|
|
118
110
|
g.selectAll('text').attr('fill', theme.textColor);
|
|
@@ -122,12 +114,12 @@ class Combination extends _chartComponent.default {
|
|
|
122
114
|
const leftY = d3.scaleLinear().domain(y_axis_auto_range_left ? [0, leftNiceEnd] : [y_axis_min_left, y_axis_max_left]).range([chartHeight - insertPadding, insertPadding + marginTop]);
|
|
123
115
|
|
|
124
116
|
// Y axis (left)
|
|
125
|
-
this.chart.append('g').attr('class', 'y-axis-wrapper-left').attr('transform',
|
|
117
|
+
this.chart.append('g').attr('class', 'y-axis-wrapper-left').attr('transform', `translate(${insertPadding},0)`).call(d3.axisLeft(leftY).tickSizeInner(0).ticks(5).tickFormat(d => BaseUtils.getSummaryValueDisplayString(leftSummaryColumn, d, y_axis_left_summary_method))).call(g => this.drawYaxis(g, theme, rightAxisOffset));
|
|
126
118
|
const fx = d3.scaleBand().domain(new Set(data.map(d => d.name))).range([insertPadding + this.horizontalOverflowOffset, chartWidth - insertPadding - rightAxisOffset]).paddingInner(0.5).paddingOuter(0.1);
|
|
127
119
|
const x = d3.scaleBand().domain(y_axis_left_group_by_multiple_numeric_column ? new Set(data.map(d => d.group_name)) : new Set([data[0]])).range([0, fx.bandwidth()]).paddingInner(y_axis_left_group_by_multiple_numeric_column ? 0.2 : 0).paddingOuter(0);
|
|
128
120
|
|
|
129
121
|
// X axis
|
|
130
|
-
this.chart.append('g').attr('class', 'x-axis-wrapper').attr('transform',
|
|
122
|
+
this.chart.append('g').attr('class', 'x-axis-wrapper').attr('transform', `translate(0,${chartHeight - insertPadding})`).call(d3.axisBottom(fx).tickSizeOuter(0).tickSizeInner(5)).call(g => {
|
|
131
123
|
g.selectAll('.domain').attr('stroke', theme.XAxisColor);
|
|
132
124
|
g.selectAll('.tick line').attr('stroke', theme.XAxisColor);
|
|
133
125
|
g.selectAll('text').attr('font-size', theme.fontSize);
|
|
@@ -138,7 +130,7 @@ class Combination extends _chartComponent.default {
|
|
|
138
130
|
// Rect group
|
|
139
131
|
this.chart.append('g').attr('class', 'content-wrapper').selectAll().data(d3.group(data, d => d.name)).join('g').attr('transform', _ref => {
|
|
140
132
|
let [name, dum] = _ref;
|
|
141
|
-
return
|
|
133
|
+
return `translate(${fx(name)},0)`;
|
|
142
134
|
})
|
|
143
135
|
// rect item
|
|
144
136
|
.selectAll().data(_ref2 => {
|
|
@@ -154,7 +146,7 @@ class Combination extends _chartComponent.default {
|
|
|
154
146
|
return currentTheme.colors[0];
|
|
155
147
|
}
|
|
156
148
|
return d.color;
|
|
157
|
-
}).attr('data-value', d =>
|
|
149
|
+
}).attr('data-value', d => BaseUtils.getSummaryValueDisplayString(leftSummaryColumn, d.value_left, y_axis_left_summary_method)).attr('data-groupName', d => d.name).attr('data-slugid', d => d.slugId).call(g => {
|
|
158
150
|
g.nodes().forEach(rect => {
|
|
159
151
|
const parentNode = rect.parentNode;
|
|
160
152
|
// add rect borderRadius
|
|
@@ -221,7 +213,7 @@ class Combination extends _chartComponent.default {
|
|
|
221
213
|
let offset = 0;
|
|
222
214
|
if (rightAxisWidth > insertPadding) {
|
|
223
215
|
offset = rightAxisWidth - insertPadding;
|
|
224
|
-
rightAxisWrapper.attr('transform',
|
|
216
|
+
rightAxisWrapper.attr('transform', `translate(${chartWidth - insertPadding - offset},0)`);
|
|
225
217
|
return offset;
|
|
226
218
|
}
|
|
227
219
|
return offset;
|
|
@@ -244,14 +236,14 @@ class Combination extends _chartComponent.default {
|
|
|
244
236
|
});
|
|
245
237
|
});
|
|
246
238
|
} else {
|
|
247
|
-
if (leftSummaryColumn
|
|
239
|
+
if (leftSummaryColumn === null || leftSummaryColumn === void 0 ? void 0 : leftSummaryColumn.name) {
|
|
248
240
|
newData.push({
|
|
249
241
|
group_name: leftSummaryColumn.name
|
|
250
242
|
});
|
|
251
243
|
}
|
|
252
244
|
}
|
|
253
245
|
// right legend item
|
|
254
|
-
if (rightSummaryColumn
|
|
246
|
+
if (rightSummaryColumn === null || rightSummaryColumn === void 0 ? void 0 : rightSummaryColumn.name) {
|
|
255
247
|
newData.push({
|
|
256
248
|
group_name: String(rightSummaryColumn.name) + ' '
|
|
257
249
|
}); // Add a space character to avoid merging with the previous left legend
|
|
@@ -266,7 +258,7 @@ class Combination extends _chartComponent.default {
|
|
|
266
258
|
const {
|
|
267
259
|
y_axis_left_group_by_multiple_numeric_column
|
|
268
260
|
} = chart.config;
|
|
269
|
-
const currentTheme =
|
|
261
|
+
const currentTheme = BaseUtils.getCurrentTheme(chartColorTheme);
|
|
270
262
|
|
|
271
263
|
// left color map
|
|
272
264
|
if (y_axis_left_group_by_multiple_numeric_column) {
|
|
@@ -292,8 +284,8 @@ class Combination extends _chartComponent.default {
|
|
|
292
284
|
chartColorTheme,
|
|
293
285
|
globalTheme
|
|
294
286
|
} = this.props;
|
|
295
|
-
const theme =
|
|
296
|
-
const currentTheme =
|
|
287
|
+
const theme = CHART_THEME_COLOR[globalTheme];
|
|
288
|
+
const currentTheme = BaseUtils.getCurrentTheme(chartColorTheme);
|
|
297
289
|
const {
|
|
298
290
|
line_type,
|
|
299
291
|
label_font_size,
|
|
@@ -310,7 +302,7 @@ class Combination extends _chartComponent.default {
|
|
|
310
302
|
circleData[index]['y'] = y;
|
|
311
303
|
circleData[index]['value'] = d.value_right;
|
|
312
304
|
return y;
|
|
313
|
-
}).curve(line_type ===
|
|
305
|
+
}).curve(line_type === CHART_LINE_TYPES[1] ? d3.curveBumpX : d3.curveLinear);
|
|
314
306
|
const rightContentWrapper = this.chart.append('g').attr('class', 'lines-wrapper');
|
|
315
307
|
|
|
316
308
|
// line
|
|
@@ -322,13 +314,13 @@ class Combination extends _chartComponent.default {
|
|
|
322
314
|
// circle label
|
|
323
315
|
if (showRightValue) {
|
|
324
316
|
const curCircleEl = g.node();
|
|
325
|
-
rightContentWrapper.append('text').attr('stroke', '#fff').attr('stroke-width', 1).attr('paint-order', 'stroke').attr('fill', theme.labelColor).attr('font-size',
|
|
317
|
+
rightContentWrapper.append('text').attr('stroke', '#fff').attr('stroke-width', 1).attr('paint-order', 'stroke').attr('fill', theme.labelColor).attr('font-size', BaseUtils.getLabelFontSize(label_font_size)).text(BaseUtils.getSummaryValueDisplayString(rightSummaryColumn, Number(curCircleEl.getAttribute('data-text')), y_axis_right_summary_column)).call(g => {
|
|
326
318
|
const {
|
|
327
319
|
width
|
|
328
320
|
} = g.node().getBoundingClientRect();
|
|
329
321
|
const translateX = Number(curCircleEl.getAttribute('cx')) - width / 2;
|
|
330
322
|
const translateY = Number(curCircleEl.getAttribute('cy')) - 10;
|
|
331
|
-
g.attr('transform',
|
|
323
|
+
g.attr('transform', `translate(${translateX}, ${translateY})`);
|
|
332
324
|
});
|
|
333
325
|
}
|
|
334
326
|
}).on('mouseover', event => {
|
|
@@ -363,28 +355,28 @@ class Combination extends _chartComponent.default {
|
|
|
363
355
|
y_axis_left_group_by_multiple_numeric_column,
|
|
364
356
|
y_axis_right_summary_method
|
|
365
357
|
} = chart.config;
|
|
366
|
-
const currentTheme =
|
|
358
|
+
const currentTheme = BaseUtils.getCurrentTheme(chartColorTheme);
|
|
367
359
|
const {
|
|
368
360
|
offsetX,
|
|
369
361
|
offsetY
|
|
370
362
|
} = event;
|
|
371
363
|
const newTooltipData = {};
|
|
372
364
|
if (isCircle) {
|
|
373
|
-
newTooltipData['title'] = !rightTitle && typeof rightTitle !== 'number' ?
|
|
365
|
+
newTooltipData['title'] = !rightTitle && typeof rightTitle !== 'number' ? intl.get(EMPTY_NAME) : rightTitle;
|
|
374
366
|
newTooltipData['items'] = [{
|
|
375
367
|
color: currentTheme.colors[1],
|
|
376
368
|
name: event.target.getAttribute('data-name'),
|
|
377
|
-
value:
|
|
369
|
+
value: BaseUtils.getSummaryValueDisplayString(rightSummaryColumn, Number(event.target.getAttribute('data-text')), y_axis_right_summary_method)
|
|
378
370
|
}];
|
|
379
371
|
} else {
|
|
380
372
|
const curGroup = event.target.parentNode;
|
|
381
373
|
const [curGroupName, data] = curGroup.__data__;
|
|
382
|
-
newTooltipData['title'] = !curGroupName && typeof curGroupName !== 'number' ?
|
|
374
|
+
newTooltipData['title'] = !curGroupName && typeof curGroupName !== 'number' ? intl.get(EMPTY_NAME) : curGroupName;
|
|
383
375
|
newTooltipData['items'] = data.map(item => {
|
|
384
376
|
return {
|
|
385
377
|
color: y_axis_left_group_by_multiple_numeric_column ? this.colorMap[item.group_name] : currentTheme.colors[0],
|
|
386
378
|
name: y_axis_left_group_by_multiple_numeric_column ? item.group_name : leftTitle,
|
|
387
|
-
value:
|
|
379
|
+
value: BaseUtils.getSummaryValueDisplayString(leftSummaryColumn, Number(item.value_left), y_axis_left_summary_method)
|
|
388
380
|
};
|
|
389
381
|
});
|
|
390
382
|
}
|
|
@@ -452,12 +444,12 @@ class Combination extends _chartComponent.default {
|
|
|
452
444
|
componentDidMount() {
|
|
453
445
|
this.createChart();
|
|
454
446
|
this.drawChart();
|
|
455
|
-
this.debouncedHandleResize =
|
|
447
|
+
this.debouncedHandleResize = debounce(this.handleResize, 300);
|
|
456
448
|
window.addEventListener('resize', this.debouncedHandleResize);
|
|
457
449
|
}
|
|
458
450
|
componentDidUpdate(prevProps) {
|
|
459
451
|
super.componentDidUpdate(prevProps);
|
|
460
|
-
if (
|
|
452
|
+
if (BaseUtils.shouldChartComponentUpdate(prevProps, this.props)) {
|
|
461
453
|
this.destroyChart();
|
|
462
454
|
this.createChart();
|
|
463
455
|
this.drawChart();
|
|
@@ -475,14 +467,14 @@ class Combination extends _chartComponent.default {
|
|
|
475
467
|
tooltipData,
|
|
476
468
|
toolTipPosition
|
|
477
469
|
} = this.state;
|
|
478
|
-
return /*#__PURE__*/
|
|
470
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
479
471
|
ref: ref => this.container = ref,
|
|
480
|
-
className: (
|
|
472
|
+
className: classNames('sea-chart-container', {
|
|
481
473
|
'show-x-axis-label': this.isShowXAxisLabel(chart),
|
|
482
474
|
'show-y-axis-left-label': this.isShowYAxisLeftLabel(chart),
|
|
483
475
|
'show-y-axis-right-label': this.isShowYAxisRightLabel(chart)
|
|
484
476
|
})
|
|
485
|
-
}, /*#__PURE__*/
|
|
477
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
486
478
|
tooltipData: tooltipData,
|
|
487
479
|
toolTipPosition: toolTipPosition,
|
|
488
480
|
chart: this.chart
|
|
@@ -490,16 +482,16 @@ class Combination extends _chartComponent.default {
|
|
|
490
482
|
}
|
|
491
483
|
}
|
|
492
484
|
Combination.propTypes = {
|
|
493
|
-
canvasStyle:
|
|
494
|
-
chart:
|
|
495
|
-
groupbyColumn:
|
|
496
|
-
columnGroupbyColumn:
|
|
497
|
-
summaryColumn:
|
|
498
|
-
result:
|
|
499
|
-
tables:
|
|
500
|
-
globalTheme:
|
|
501
|
-
chartColorTheme:
|
|
502
|
-
toggleRecords:
|
|
503
|
-
customRender:
|
|
485
|
+
canvasStyle: PropTypes.object,
|
|
486
|
+
chart: PropTypes.object,
|
|
487
|
+
groupbyColumn: PropTypes.object,
|
|
488
|
+
columnGroupbyColumn: PropTypes.object,
|
|
489
|
+
summaryColumn: PropTypes.object,
|
|
490
|
+
result: PropTypes.array,
|
|
491
|
+
tables: PropTypes.array,
|
|
492
|
+
globalTheme: PropTypes.string,
|
|
493
|
+
chartColorTheme: PropTypes.string,
|
|
494
|
+
toggleRecords: PropTypes.func,
|
|
495
|
+
customRender: PropTypes.func
|
|
504
496
|
};
|
|
505
|
-
|
|
497
|
+
export default Combination;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var d3 = _interopRequireWildcard(require("d3"));
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _constants = require("../../constants");
|
|
15
|
-
var _utils = require("../../utils");
|
|
16
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
17
|
-
var _tooltip = _interopRequireDefault(require("../../components/tooltip"));
|
|
18
|
-
var _chartComponent = _interopRequireDefault(require("./chart-component"));
|
|
19
|
-
class Completeness extends _chartComponent.default {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { debounce, cloneDeep } from 'lodash-es';
|
|
4
|
+
import * as d3 from 'd3';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { CHART_THEME_COLOR } from '../../constants';
|
|
7
|
+
import { BaseUtils } from '../../utils';
|
|
8
|
+
import intl from '../../intl';
|
|
9
|
+
import ToolTip from '../../components/tooltip';
|
|
10
|
+
import ChartComponent from './chart-component';
|
|
11
|
+
class Completeness extends ChartComponent {
|
|
20
12
|
constructor(props) {
|
|
21
13
|
super(props);
|
|
22
14
|
this.handleResize = () => {
|
|
@@ -43,7 +35,7 @@ class Completeness extends _chartComponent.default {
|
|
|
43
35
|
let {
|
|
44
36
|
result: data
|
|
45
37
|
} = this.props;
|
|
46
|
-
data =
|
|
38
|
+
data = BaseUtils.formatEmptyName(data, (_this$props$chart = this.props.chart) === null || _this$props$chart === void 0 ? void 0 : (_this$props$chart$con = _this$props$chart.config) === null || _this$props$chart$con === void 0 ? void 0 : _this$props$chart$con.column_groupby_column_key, intl.get('Empty'));
|
|
47
39
|
if (!Array.isArray(data)) return;
|
|
48
40
|
this.draw(data);
|
|
49
41
|
};
|
|
@@ -54,7 +46,7 @@ class Completeness extends _chartComponent.default {
|
|
|
54
46
|
chartColorTheme,
|
|
55
47
|
columnGroupbyColumn
|
|
56
48
|
} = this.props;
|
|
57
|
-
const theme =
|
|
49
|
+
const theme = CHART_THEME_COLOR[globalTheme];
|
|
58
50
|
const {
|
|
59
51
|
y_axis_auto_range,
|
|
60
52
|
y_axis_min,
|
|
@@ -70,7 +62,7 @@ class Completeness extends _chartComponent.default {
|
|
|
70
62
|
marginRight
|
|
71
63
|
} = this.chartBoundingClientRect;
|
|
72
64
|
this.markLastForCompleteness(data);
|
|
73
|
-
const colors =
|
|
65
|
+
const colors = BaseUtils.getCurrentTheme(chartColorTheme).colors;
|
|
74
66
|
// Normalize groupby to string before setColorMap to ensure consistent keys
|
|
75
67
|
data.forEach(item => {
|
|
76
68
|
if (Array.isArray(item.groupby)) {
|
|
@@ -94,7 +86,7 @@ class Completeness extends _chartComponent.default {
|
|
|
94
86
|
const {
|
|
95
87
|
width: axisWidth
|
|
96
88
|
} = g.node().getBoundingClientRect();
|
|
97
|
-
g.attr('transform',
|
|
89
|
+
g.attr('transform', `translate(${axisWidth}, 0)`).attr('data-axisWidth', axisWidth);
|
|
98
90
|
this.checkTickOverlap(g, 'yAxis');
|
|
99
91
|
});
|
|
100
92
|
|
|
@@ -102,7 +94,7 @@ class Completeness extends _chartComponent.default {
|
|
|
102
94
|
const allSeries = this.getAllSeries(newSeries);
|
|
103
95
|
const niceEnd = d3.nice(0, d3.max(allSeries, d => d.sumValue), 5)[1];
|
|
104
96
|
const x = d3.scaleLinear().domain(y_axis_auto_range ? [0, niceEnd] : [y_axis_min || 0, y_axis_max || niceEnd]).range([Number(yAxis.node().getAttribute('data-axisWidth')), chartWidth - insertPadding - marginRight]);
|
|
105
|
-
this.chart.append('g').attr('class', 'x-axis-wrapper').attr('transform',
|
|
97
|
+
this.chart.append('g').attr('class', 'x-axis-wrapper').attr('transform', `translate(0, ${chartHeight - insertPadding})`).call(d3.axisBottom(x).tickSizeInner(0).ticks(5)).call(g => {
|
|
106
98
|
g.selectAll('.domain').remove();
|
|
107
99
|
g.selectAll('.tick line').node() && g.selectAll('.tick line').node().remove(); // delete the first line
|
|
108
100
|
g.selectAll('.tick line').attr('y2', -(chartHeight - insertPadding * 2)).attr('stroke', theme.gridColor).attr('stroke-dasharray', '8,3');
|
|
@@ -111,13 +103,13 @@ class Completeness extends _chartComponent.default {
|
|
|
111
103
|
});
|
|
112
104
|
|
|
113
105
|
// Rect group
|
|
114
|
-
const contentWrapper = this.chart.append('g').attr('class', 'content-wrapper').attr('transform',
|
|
106
|
+
const contentWrapper = this.chart.append('g').attr('class', 'content-wrapper').attr('transform', `translate(${Number(yAxis.node().getAttribute('data-axisWidth'))}, 0)`);
|
|
115
107
|
const mainGroups = contentWrapper.selectAll().data(newSeries).join('g').attr('transform', _ref => {
|
|
116
108
|
let [name] = _ref;
|
|
117
|
-
return
|
|
109
|
+
return `translate(0, ${fy(name)})`;
|
|
118
110
|
}).attr('data-transform', _ref2 => {
|
|
119
111
|
let [name] = _ref2;
|
|
120
|
-
return
|
|
112
|
+
return `${fy(name)}`;
|
|
121
113
|
});
|
|
122
114
|
const colorMap = this.colorMap;
|
|
123
115
|
const self = this;
|
|
@@ -143,7 +135,7 @@ class Completeness extends _chartComponent.default {
|
|
|
143
135
|
const completedValue = completedItem ? Number(((_completedItem$rawDat = completedItem.rawData) === null || _completedItem$rawDat === void 0 ? void 0 : _completedItem$rawDat.value) || 0) : 0;
|
|
144
136
|
const targetValue = restValue + completedValue;
|
|
145
137
|
if (!targetValue) return '';
|
|
146
|
-
return
|
|
138
|
+
return `${Math.round(completedValue / targetValue * 100)}%`;
|
|
147
139
|
}).selectAll().data(_ref6 => {
|
|
148
140
|
let [_, d] = _ref6;
|
|
149
141
|
return d;
|
|
@@ -241,7 +233,7 @@ class Completeness extends _chartComponent.default {
|
|
|
241
233
|
title: event.currentTarget.getAttribute('data-tooltipTitle'),
|
|
242
234
|
items: [{
|
|
243
235
|
color: event.currentTarget.getAttribute('data-tooltipName') === 'rest' ? '#bdbdbd' : this.colorMap[groupby],
|
|
244
|
-
name:
|
|
236
|
+
name: intl.get(event.currentTarget.getAttribute('data-tooltipName')),
|
|
245
237
|
value: event.currentTarget.getAttribute('data-value')
|
|
246
238
|
}]
|
|
247
239
|
};
|
|
@@ -279,7 +271,7 @@ class Completeness extends _chartComponent.default {
|
|
|
279
271
|
});
|
|
280
272
|
};
|
|
281
273
|
this.getGroupSeries = (data, columnGroupbyColumn, chart) => {
|
|
282
|
-
const sortedData =
|
|
274
|
+
const sortedData = BaseUtils.sortDataByGroupName(cloneDeep(data), 'groupby', columnGroupbyColumn, chart);
|
|
283
275
|
sortedData.forEach(item => {
|
|
284
276
|
if (Array.isArray(item.groupby)) {
|
|
285
277
|
item.groupby = item.groupby.join(', ');
|
|
@@ -289,7 +281,7 @@ class Completeness extends _chartComponent.default {
|
|
|
289
281
|
// Sort main groups by name for stable order
|
|
290
282
|
groups.sort((a, b) => String(a[0]).localeCompare(String(b[0])));
|
|
291
283
|
groups.forEach((item, index) => {
|
|
292
|
-
const itemData =
|
|
284
|
+
const itemData = cloneDeep(item[1]);
|
|
293
285
|
const valueMap = d3.rollup(itemData, v => d3.sum(v, d => d.value), d => d.groupby, d => d.group_name);
|
|
294
286
|
const rawDataMap = d3.rollup(itemData, v => v[0], d => d.groupby, d => d.group_name);
|
|
295
287
|
|
|
@@ -391,7 +383,7 @@ class Completeness extends _chartComponent.default {
|
|
|
391
383
|
}).on('mouseleave', event => {
|
|
392
384
|
this.hiddenTooltip();
|
|
393
385
|
this.handleAcitveAndInActiveState('active', event);
|
|
394
|
-
}).append('xhtml:div').attr('style',
|
|
386
|
+
}).append('xhtml:div').attr('style', `width: 100%; height: 100%; background-color: ${rect.getAttribute('fill')}; border-radius: 0px ${xWidth * borderRadius}px ${xWidth * borderRadius}px 0px`);
|
|
395
387
|
|
|
396
388
|
// Remove old rect
|
|
397
389
|
d3.select(rect).remove();
|
|
@@ -406,12 +398,12 @@ class Completeness extends _chartComponent.default {
|
|
|
406
398
|
super.componentDidMount();
|
|
407
399
|
this.createChart();
|
|
408
400
|
this.drawChart();
|
|
409
|
-
this.debouncedHandleResize =
|
|
401
|
+
this.debouncedHandleResize = debounce(this.handleResize, 300);
|
|
410
402
|
window.addEventListener('resize', this.debouncedHandleResize);
|
|
411
403
|
}
|
|
412
404
|
componentDidUpdate(prevProps) {
|
|
413
405
|
super.componentDidUpdate(prevProps);
|
|
414
|
-
if (
|
|
406
|
+
if (BaseUtils.shouldChartComponentUpdate(prevProps, this.props)) {
|
|
415
407
|
this.destroyChart();
|
|
416
408
|
this.createChart();
|
|
417
409
|
this.drawChart();
|
|
@@ -430,13 +422,13 @@ class Completeness extends _chartComponent.default {
|
|
|
430
422
|
tooltipData,
|
|
431
423
|
toolTipPosition
|
|
432
424
|
} = this.state;
|
|
433
|
-
return /*#__PURE__*/
|
|
425
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
434
426
|
ref: ref => this.container = ref,
|
|
435
|
-
className: (
|
|
427
|
+
className: classNames('sea-chart-container', {
|
|
436
428
|
'show-x-axis-label': this.isShowHorizontalAxisLabel(chart),
|
|
437
429
|
'show-y-axis-label': this.isShowVerticalAxisLabel(chart)
|
|
438
430
|
})
|
|
439
|
-
}, /*#__PURE__*/
|
|
431
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
440
432
|
tooltipData: tooltipData,
|
|
441
433
|
toolTipPosition: toolTipPosition,
|
|
442
434
|
chart: this.chart
|
|
@@ -444,15 +436,15 @@ class Completeness extends _chartComponent.default {
|
|
|
444
436
|
}
|
|
445
437
|
}
|
|
446
438
|
Completeness.propTypes = {
|
|
447
|
-
canvasStyle:
|
|
448
|
-
chart:
|
|
449
|
-
groupbyColumn:
|
|
450
|
-
columnGroupbyColumn:
|
|
451
|
-
summaryColumn:
|
|
452
|
-
result:
|
|
453
|
-
tables:
|
|
454
|
-
globalTheme:
|
|
455
|
-
chartColorTheme:
|
|
456
|
-
toggleRecords:
|
|
439
|
+
canvasStyle: PropTypes.object,
|
|
440
|
+
chart: PropTypes.object,
|
|
441
|
+
groupbyColumn: PropTypes.object,
|
|
442
|
+
columnGroupbyColumn: PropTypes.object,
|
|
443
|
+
summaryColumn: PropTypes.object,
|
|
444
|
+
result: PropTypes.array,
|
|
445
|
+
tables: PropTypes.array,
|
|
446
|
+
globalTheme: PropTypes.string,
|
|
447
|
+
chartColorTheme: PropTypes.string,
|
|
448
|
+
toggleRecords: PropTypes.func
|
|
457
449
|
};
|
|
458
|
-
|
|
450
|
+
export default Completeness;
|