sea-chart 2.0.38 → 2.0.39
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 +15 -8
- package/dist/components/cell-factory/FormatterConfig.js +62 -55
- package/dist/components/cell-factory/SimpleCellFormatter.js +12 -5
- package/dist/components/cell-factory/SingleSelectOption.js +18 -11
- package/dist/components/cell-factory/cell-editor-factory.js +12 -5
- package/dist/components/cell-factory/cell-formatter-factory.js +11 -4
- package/dist/components/cell-factory/link-content.js +38 -30
- package/dist/components/chart-color-selector/color-selector.js +18 -11
- package/dist/components/collaborator/index.js +14 -7
- package/dist/components/color-picker/index.js +19 -12
- package/dist/components/color-popover/color-rules/color-rule.js +34 -26
- package/dist/components/color-popover/color-rules/index.js +15 -7
- package/dist/components/color-popover/color-rules/rule-filters/filter.js +34 -27
- package/dist/components/color-popover/color-rules/rule-filters/index.js +25 -17
- package/dist/components/color-popover/color-rules/rule-filters/number-input.js +17 -9
- package/dist/components/color-popover/color-rules-popover.js +38 -30
- package/dist/components/color-popover/color-selector-popover.js +20 -12
- package/dist/components/color-setting/color-group-selector.js +21 -13
- package/dist/components/common-add-tool/index.js +15 -8
- package/dist/components/data-process-setter/data-setting-header.js +14 -7
- package/dist/components/data-process-setter/hide-column-setter.js +20 -13
- package/dist/components/data-process-setter/index.js +27 -4
- package/dist/components/data-process-setter/sort-setter.js +26 -18
- package/dist/components/draggable/Draggable.js +13 -7
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +48 -40
- package/dist/components/drill-down-settings/drill-down-fields-settings/index.js +18 -10
- package/dist/components/drill-down-settings/index.js +18 -11
- package/dist/components/dtable-popover/index.js +20 -13
- package/dist/components/dtable-search-input/index.js +21 -13
- package/dist/components/font-settings/index.js +22 -14
- package/dist/components/goal-line-setting/goal-setting-item.js +14 -6
- package/dist/components/goal-line-setting/index.js +19 -12
- package/dist/components/highlighter/highlighter.js +14 -7
- package/dist/components/icon/index.js +12 -5
- package/dist/components/index.js +48 -7
- package/dist/components/loading/index.js +13 -6
- package/dist/components/number-input/index.js +11 -4
- package/dist/components/pixel-editor/index.js +23 -15
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +15 -8
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +34 -26
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +18 -9
- package/dist/components/popover/sort-popover/sort-popover.js +65 -55
- package/dist/components/resize-handle/ResizeHandle.js +13 -6
- package/dist/components/row-card/row-card-header-cell.js +24 -17
- package/dist/components/row-card/row-card-header.js +22 -15
- package/dist/components/row-card/row-card-item.js +43 -35
- package/dist/components/row-card/row-card.js +25 -17
- package/dist/components/statistic-record-dialog/index.js +64 -56
- package/dist/components/tooltip/index.js +21 -14
- package/dist/components/types-dialog/index.js +70 -62
- package/dist/components/types-dialog/use-force-update.js +10 -4
- package/dist/constants/color-rules.js +14 -8
- package/dist/constants/common-constants.js +14 -8
- package/dist/constants/error.js +8 -2
- package/dist/constants/geolocation.js +15 -9
- package/dist/constants/index.js +271 -142
- package/dist/constants/key-codes.js +2 -0
- package/dist/constants/model.js +9 -3
- package/dist/constants/regions.js +8 -3
- package/dist/constants/style.js +12 -6
- package/dist/constants/table.js +7 -1
- package/dist/constants/type-image.js +39 -33
- package/dist/constants/type.js +9 -3
- package/dist/context.js +20 -13
- package/dist/editor/index.js +15 -8
- package/dist/index.js +104 -13
- package/dist/intl.js +17 -10
- package/dist/locale/index.js +23 -16
- package/dist/locale/lang/de.js +7 -1
- package/dist/locale/lang/en.js +7 -1
- package/dist/locale/lang/es.js +7 -1
- package/dist/locale/lang/fr.js +7 -1
- package/dist/locale/lang/pt.js +7 -1
- package/dist/locale/lang/ru.js +7 -1
- package/dist/locale/lang/zh_CN.js +7 -1
- package/dist/model/area-group.js +19 -12
- package/dist/model/area.js +19 -12
- package/dist/model/bar-custom.js +18 -11
- package/dist/model/bar-group.js +19 -12
- package/dist/model/bar-stack.js +17 -10
- package/dist/model/bar.js +18 -11
- package/dist/model/base-model.js +11 -4
- package/dist/model/basic-number-card.js +20 -13
- package/dist/model/chart.js +13 -7
- package/dist/model/combination.js +22 -15
- package/dist/model/compare-bar.js +21 -14
- package/dist/model/completeness-group.js +18 -11
- package/dist/model/completeness.js +17 -10
- package/dist/model/dashboard.js +14 -7
- package/dist/model/funnel.js +21 -14
- package/dist/model/generic-model.js +143 -135
- package/dist/model/heat-map.js +16 -9
- package/dist/model/horizontal-bar.js +18 -11
- package/dist/model/horizontal-group-bar.js +17 -10
- package/dist/model/index.js +93 -69
- package/dist/model/line-group.js +20 -13
- package/dist/model/line.js +19 -12
- package/dist/model/map-bubble.js +19 -12
- package/dist/model/map.js +19 -12
- package/dist/model/mirror.js +20 -13
- package/dist/model/pie.js +19 -12
- package/dist/model/ring.js +19 -12
- package/dist/model/scatter.js +17 -10
- package/dist/model/stacked-horizontal-bar.js +18 -11
- package/dist/model/table-element.js +12 -5
- package/dist/model/table.js +14 -7
- package/dist/model/tree-map.js +14 -7
- package/dist/model/trend.js +18 -11
- package/dist/model/user.js +7 -1
- package/dist/model/world-map-bubble.js +19 -12
- package/dist/model/world-map.js +19 -12
- package/dist/services/map-json.js +17 -11
- package/dist/settings/advance-bar-settings/data-settings.js +44 -36
- package/dist/settings/advance-bar-settings/index.js +20 -3
- package/dist/settings/advance-bar-settings/style-settings.js +71 -63
- package/dist/settings/bar-settings/data-settings.js +47 -39
- package/dist/settings/bar-settings/index.js +20 -3
- package/dist/settings/bar-settings/style-settings.js +57 -49
- package/dist/settings/basic-number-card/data-settings.js +57 -49
- package/dist/settings/basic-number-card/index.js +20 -3
- package/dist/settings/basic-number-card/style-settings.js +27 -19
- package/dist/settings/combination-settings/data-settings.js +63 -55
- package/dist/settings/combination-settings/index.js +20 -3
- package/dist/settings/combination-settings/style-settings.js +73 -65
- package/dist/settings/completeness-settings/callbacks/callbacks.js +27 -16
- package/dist/settings/completeness-settings/data-settings/completion-settings.js +28 -21
- package/dist/settings/completeness-settings/data-settings/data-settings.js +32 -25
- package/dist/settings/completeness-settings/index.js +20 -3
- package/dist/settings/completeness-settings/style-settings.js +26 -19
- package/dist/settings/dashboard-settings/data-settings.js +51 -43
- package/dist/settings/dashboard-settings/index.js +13 -2
- package/dist/settings/data-settings.js +79 -72
- package/dist/settings/funnel-settings/components/dnd-item/dnd-item.js +19 -12
- package/dist/settings/funnel-settings/components/dnd-list.js +23 -15
- package/dist/settings/funnel-settings/components/funnel-label-setting.js +40 -32
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +28 -20
- package/dist/settings/funnel-settings/data-settings.js +31 -23
- package/dist/settings/funnel-settings/index.js +20 -3
- package/dist/settings/funnel-settings/style-settings.js +19 -11
- package/dist/settings/heat-map-settings/data-settings.js +26 -18
- package/dist/settings/heat-map-settings/index.js +20 -3
- package/dist/settings/heat-map-settings/style-settings.js +26 -18
- package/dist/settings/horizontal-bar-settings/data-settings.js +19 -12
- package/dist/settings/horizontal-bar-settings/index.js +20 -3
- package/dist/settings/horizontal-bar-settings/style-settings.js +19 -12
- package/dist/settings/index.js +70 -52
- package/dist/settings/map-settings/components/location-field-selector.js +17 -10
- package/dist/settings/map-settings/components/map-level-selector.js +18 -11
- package/dist/settings/map-settings/components/map-province-city-selector.js +26 -19
- package/dist/settings/map-settings/index.js +20 -3
- package/dist/settings/map-settings/map-data-settings.js +30 -23
- package/dist/settings/map-settings/map-style-settings.js +35 -27
- package/dist/settings/mirror-settings/data-settings.js +34 -26
- package/dist/settings/mirror-settings/index.js +13 -2
- package/dist/settings/pie-settings/data-settings.js +41 -33
- package/dist/settings/pie-settings/index.js +20 -3
- package/dist/settings/pie-settings/style-settings.js +55 -47
- package/dist/settings/scatter/data-settings.js +34 -27
- package/dist/settings/scatter/index.js +12 -3
- package/dist/settings/stacks-settings/index.js +27 -19
- package/dist/settings/stacks-settings/stack-item-settings.js +27 -19
- package/dist/settings/style-settings.js +73 -65
- package/dist/settings/table-element-settings/components/data-filter.js +38 -30
- package/dist/settings/table-element-settings/data-settings.js +29 -21
- package/dist/settings/table-element-settings/index.js +13 -2
- package/dist/settings/table-settings/data-settings.js +120 -112
- package/dist/settings/table-settings/index.js +13 -2
- package/dist/settings/time-comparison-settings/data-settings.js +51 -43
- package/dist/settings/time-comparison-settings/index.js +20 -3
- package/dist/settings/time-comparison-settings/style-settings.js +50 -42
- package/dist/settings/trend-settings/data-settings.js +32 -24
- package/dist/settings/trend-settings/index.js +20 -3
- package/dist/settings/trend-settings/style-setting.js +27 -19
- package/dist/settings/widgets/basic-summary/index.js +63 -55
- package/dist/settings/widgets/chart-type/index.js +26 -18
- package/dist/settings/widgets/color-settings/index.js +80 -72
- package/dist/settings/widgets/common-data-settings.js +29 -21
- package/dist/settings/widgets/data-filter/index.js +43 -35
- package/dist/settings/widgets/data-sort.js +24 -16
- package/dist/settings/widgets/date-summary-item.js +34 -26
- package/dist/settings/widgets/display-values-settings/index.js +22 -14
- package/dist/settings/widgets/divider/index.js +16 -8
- package/dist/settings/widgets/font-settings/font-color-settings.js +19 -11
- package/dist/settings/widgets/font-settings/font-size-settings.js +22 -14
- package/dist/settings/widgets/font-settings/font-weight-settings.js +25 -17
- package/dist/settings/widgets/font-settings/index.js +27 -4
- package/dist/settings/widgets/group-by.js +59 -51
- package/dist/settings/widgets/min-max-setting.js +18 -10
- package/dist/settings/widgets/mininum-slice-percent.js +18 -10
- package/dist/settings/widgets/numeric-summary-item.js +33 -25
- package/dist/settings/widgets/select-line-type/index.js +17 -10
- package/dist/settings/widgets/select-table/index.js +16 -9
- package/dist/settings/widgets/select-view/index.js +28 -20
- package/dist/settings/widgets/stack.js +22 -14
- package/dist/settings/widgets/summary-method-setting.js +25 -17
- package/dist/settings/widgets/summary-settings.js +82 -74
- package/dist/settings/widgets/switch/index.js +16 -9
- package/dist/settings/widgets/text-horizontal-settings.js +23 -15
- package/dist/settings/widgets/time-picker.js +37 -29
- package/dist/settings/widgets/title-settings/index.js +37 -29
- package/dist/settings/widgets/title-settings/title-text.js +12 -5
- package/dist/settings/widgets/x-axios.js +1 -0
- package/dist/settings/widgets/y-axis-group-settings.js +72 -64
- package/dist/utils/cell-format-utils.js +27 -17
- package/dist/utils/cell-value-utils.js +11 -4
- package/dist/utils/chart-utils/base-utils.js +332 -324
- package/dist/utils/chart-utils/index.js +41 -28
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +84 -77
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +20 -13
- package/dist/utils/chart-utils/original-data-utils/combination-calculator.js +52 -45
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +28 -21
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +40 -33
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +23 -16
- package/dist/utils/chart-utils/original-data-utils/index.js +57 -50
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +26 -19
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +96 -90
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +26 -19
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +38 -31
- package/dist/utils/chart-utils/sql-statistics-utils.js +237 -229
- package/dist/utils/chart.js +17 -9
- package/dist/utils/collaborator-manager.js +9 -3
- package/dist/utils/collaborator-utils.js +31 -19
- package/dist/utils/collaborator.js +15 -6
- package/dist/utils/color-utils.js +29 -18
- package/dist/utils/column-utils.js +104 -77
- package/dist/utils/common-utils.js +53 -28
- package/dist/utils/concurrency-manager.js +7 -1
- package/dist/utils/contexts.js +12 -5
- package/dist/utils/date-translate.js +20 -12
- package/dist/utils/digital-sign-utils.js +14 -7
- package/dist/utils/event-bus.js +7 -1
- package/dist/utils/hotkey.js +11 -5
- package/dist/utils/index.js +221 -54
- package/dist/utils/key-generator.js +9 -2
- package/dist/utils/map.js +31 -22
- package/dist/utils/object-utils.js +8 -2
- package/dist/utils/options-utils.js +18 -10
- package/dist/utils/row-record-utils.js +178 -166
- package/dist/utils/row-utils.js +38 -27
- package/dist/utils/search.js +32 -24
- package/dist/utils/sql/chart-data-sql.js +112 -106
- package/dist/utils/sql/column-2-sql-column.js +168 -158
- package/dist/utils/sql/index.js +27 -3
- package/dist/utils/trend-utils.js +47 -39
- package/dist/view/index.js +96 -90
- package/dist/view/title/index.js +24 -16
- package/dist/view/wrapper/area-group.js +53 -45
- package/dist/view/wrapper/area.js +51 -43
- package/dist/view/wrapper/bar-compare.js +46 -38
- package/dist/view/wrapper/bar-custom-stack.js +47 -39
- package/dist/view/wrapper/bar-group.js +53 -45
- package/dist/view/wrapper/bar-stack.js +56 -48
- package/dist/view/wrapper/bar.js +48 -40
- package/dist/view/wrapper/basic-number-card.js +34 -26
- package/dist/view/wrapper/chart-component.js +131 -123
- package/dist/view/wrapper/combination.js +63 -55
- package/dist/view/wrapper/completeness-group.js +48 -40
- package/dist/view/wrapper/completeness.js +44 -36
- package/dist/view/wrapper/dashboard.js +44 -39
- package/dist/view/wrapper/funnel.js +43 -40
- package/dist/view/wrapper/heat-map.js +70 -62
- package/dist/view/wrapper/horizontal-bar-group.js +60 -52
- package/dist/view/wrapper/horizontal-bar-stack.js +55 -47
- package/dist/view/wrapper/horizontal-bar.js +49 -41
- package/dist/view/wrapper/index.js +115 -107
- package/dist/view/wrapper/line-group.js +51 -43
- package/dist/view/wrapper/line.js +50 -42
- package/dist/view/wrapper/map-bubble.js +48 -40
- package/dist/view/wrapper/map-world-bubble.js +47 -39
- package/dist/view/wrapper/map-world.js +49 -41
- package/dist/view/wrapper/map.js +50 -42
- package/dist/view/wrapper/mirror.js +49 -41
- package/dist/view/wrapper/pie.js +52 -44
- package/dist/view/wrapper/ring.js +57 -49
- package/dist/view/wrapper/scatter.js +50 -42
- package/dist/view/wrapper/table/index.js +22 -14
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +57 -49
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +61 -53
- package/dist/view/wrapper/table/pivot-table-display-name.js +90 -82
- package/dist/view/wrapper/table/two-dimension-table.js +93 -85
- package/dist/view/wrapper/table-element/components/dataset-utils.js +36 -23
- package/dist/view/wrapper/table-element/components/formatter.js +99 -90
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +32 -23
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +16 -9
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +97 -90
- package/dist/view/wrapper/table-element/components/formula-formatter.js +16 -9
- package/dist/view/wrapper/table-element/components/link-formatter.js +97 -90
- package/dist/view/wrapper/table-element/components/record.js +20 -13
- package/dist/view/wrapper/table-element/components/records-body.js +17 -9
- package/dist/view/wrapper/table-element/components/records-header/index.js +15 -7
- package/dist/view/wrapper/table-element/components/records-header/records-header-cell.js +16 -8
- package/dist/view/wrapper/table-element/components/records.js +33 -25
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +12 -5
- package/dist/view/wrapper/table-element/components/utils.js +16 -6
- package/dist/view/wrapper/table-element/components/value-display-utils.js +11 -4
- package/dist/view/wrapper/table-element/components/vertical-scrollbar/index.js +13 -6
- package/dist/view/wrapper/table-element/index.js +26 -18
- package/dist/view/wrapper/treemap.js +46 -38
- package/dist/view/wrapper/trend.js +66 -58
- package/package.json +1 -1
package/dist/model/area-group.js
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class AreaGroup extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.AREA_GROUP
|
|
15
|
+
type: _constants.CHART_TYPE.AREA_GROUP
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// x-axis
|
|
12
19
|
this.x_axis_column_key = options.x_axis_column_key;
|
|
13
|
-
this.x_axis_include_empty_cells = isBoolean(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
20
|
+
this.x_axis_include_empty_cells = (0, _utils.isBoolean)(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
14
21
|
this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
15
22
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
16
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
23
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
17
24
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
18
25
|
|
|
19
26
|
// y-axis
|
|
20
27
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
21
|
-
this.y_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
28
|
+
this.y_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
22
29
|
this.y_axis_summary_method = options.y_axis_summary_method;
|
|
23
|
-
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
24
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_value : false;
|
|
30
|
+
this.y_axis_show_value = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
31
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_value : false;
|
|
25
32
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
26
33
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
27
34
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -37,7 +44,7 @@ class AreaGroup extends BaseModel {
|
|
|
37
44
|
this.y_axis_use_stack = options.y_axis_use_stack;
|
|
38
45
|
this.label_font_size = options.label_font_size;
|
|
39
46
|
// default as curve
|
|
40
|
-
this.line_type = options.line_type || CHART_LINE_TYPES[1];
|
|
47
|
+
this.line_type = options.line_type || _constants.CHART_LINE_TYPES[1];
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
|
-
|
|
50
|
+
var _default = exports.default = AreaGroup;
|
package/dist/model/area.js
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class Area extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.AREA
|
|
15
|
+
type: _constants.CHART_TYPE.AREA
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// x axis
|
|
12
19
|
this.x_axis_column_key = options.x_axis_column_key;
|
|
13
|
-
this.x_axis_include_empty_cells = isBoolean(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
14
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
20
|
+
this.x_axis_include_empty_cells = (0, _utils.isBoolean)(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
21
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
15
22
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
16
23
|
|
|
17
24
|
// y axis
|
|
18
25
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
19
|
-
this.y_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
26
|
+
this.y_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
20
27
|
this.y_axis_summary_method = options.y_axis_summary_method;
|
|
21
|
-
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
22
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
28
|
+
this.y_axis_show_value = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
29
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
23
30
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
24
31
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
25
32
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -27,7 +34,7 @@ class Area extends BaseModel {
|
|
|
27
34
|
this.y_axis_label_color = options.y_axis_label_color;
|
|
28
35
|
this.sort_type = options.sort_type;
|
|
29
36
|
this.label_font_size = options.label_font_size;
|
|
30
|
-
this.line_type = options.line_type || CHART_LINE_TYPES[1];
|
|
37
|
+
this.line_type = options.line_type || _constants.CHART_LINE_TYPES[1];
|
|
31
38
|
}
|
|
32
39
|
}
|
|
33
|
-
|
|
40
|
+
var _default = exports.default = Area;
|
package/dist/model/bar-custom.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
9
|
+
var _utils = require("../utils");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
class BarCustom extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.BAR_CUSTOM
|
|
15
|
+
type: _constants.CHART_TYPE.BAR_CUSTOM
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// x-axis
|
|
@@ -15,17 +22,17 @@ class BarCustom extends BaseModel {
|
|
|
15
22
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
16
23
|
|
|
17
24
|
// x-axis style
|
|
18
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
26
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
20
27
|
|
|
21
28
|
// y-axis
|
|
22
29
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
23
|
-
this.y_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
24
|
-
this.y_axis_summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
30
|
+
this.y_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
31
|
+
this.y_axis_summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
25
32
|
|
|
26
33
|
// y-axis style
|
|
27
|
-
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
28
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
34
|
+
this.y_axis_show_value = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
35
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
36
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
30
37
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
31
38
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -37,4 +44,4 @@ class BarCustom extends BaseModel {
|
|
|
37
44
|
this.label_font_size = options.label_font_size;
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
|
-
|
|
47
|
+
var _default = exports.default = BarCustom;
|
package/dist/model/bar-group.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
9
|
+
var _utils = require("../utils");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
class BarGroup extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.BAR_GROUP
|
|
15
|
+
type: _constants.CHART_TYPE.BAR_GROUP
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// x-axis
|
|
@@ -15,17 +22,17 @@ class BarGroup extends BaseModel {
|
|
|
15
22
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
16
23
|
|
|
17
24
|
// x-axis style
|
|
18
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
26
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
20
27
|
|
|
21
28
|
// y-axis
|
|
22
29
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
23
|
-
this.y_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
24
|
-
this.y_axis_summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
30
|
+
this.y_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
31
|
+
this.y_axis_summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
25
32
|
|
|
26
33
|
// y axis style
|
|
27
|
-
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
28
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
34
|
+
this.y_axis_show_value = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
35
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
36
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
30
37
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
31
38
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -36,9 +43,9 @@ class BarGroup extends BaseModel {
|
|
|
36
43
|
this.column_groupby_column_key = options.column_groupby_column_key;
|
|
37
44
|
this.column_groupby_date_granularity = options.column_groupby_date_granularity;
|
|
38
45
|
this.column_groupby_geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
39
|
-
this.column_groupby_multiple_numeric_column = isBoolean(options.column_groupby_multiple_numeric_column) ? options.column_groupby_multiple_numeric_column : false;
|
|
46
|
+
this.column_groupby_multiple_numeric_column = (0, _utils.isBoolean)(options.column_groupby_multiple_numeric_column) ? options.column_groupby_multiple_numeric_column : false;
|
|
40
47
|
this.summary_columns = options.summary_columns;
|
|
41
48
|
this.label_font_size = options.label_font_size;
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
|
-
|
|
51
|
+
var _default = exports.default = BarGroup;
|
package/dist/model/bar-stack.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class BarStack extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.BAR_STACK
|
|
15
|
+
type: _constants.CHART_TYPE.BAR_STACK
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// x axis
|
|
@@ -13,15 +20,15 @@ class BarStack extends BaseModel {
|
|
|
13
20
|
this.x_axis_include_empty_cells = options.x_axis_include_empty_cells;
|
|
14
21
|
this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
15
22
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
16
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
23
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
17
24
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
18
25
|
|
|
19
26
|
// y axis
|
|
20
27
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
21
|
-
this.y_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
28
|
+
this.y_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
22
29
|
this.y_axis_summary_method = options.y_axis_summary_method;
|
|
23
|
-
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
24
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
30
|
+
this.y_axis_show_value = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
31
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
25
32
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
26
33
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
27
34
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -39,4 +46,4 @@ class BarStack extends BaseModel {
|
|
|
39
46
|
this.label_font_size = options.label_font_size;
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
|
-
|
|
49
|
+
var _default = exports.default = BarStack;
|
package/dist/model/bar.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class Bar extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.BAR
|
|
15
|
+
type: _constants.CHART_TYPE.BAR
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// x-axis
|
|
@@ -15,17 +22,17 @@ class Bar extends BaseModel {
|
|
|
15
22
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
16
23
|
|
|
17
24
|
// x-axis style
|
|
18
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
26
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
20
27
|
|
|
21
28
|
// y-axis
|
|
22
29
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
23
|
-
this.y_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
24
|
-
this.y_axis_summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
30
|
+
this.y_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
31
|
+
this.y_axis_summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
25
32
|
|
|
26
33
|
// y-axis style
|
|
27
|
-
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
28
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
34
|
+
this.y_axis_show_value = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
35
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
36
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
30
37
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
31
38
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -35,4 +42,4 @@ class Bar extends BaseModel {
|
|
|
35
42
|
this.label_font_size = options.label_font_size;
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
|
-
|
|
45
|
+
var _default = exports.default = Bar;
|
package/dist/model/base-model.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _constants = require("../constants");
|
|
8
|
+
class BaseModel {
|
|
3
9
|
constructor(options) {
|
|
4
|
-
this.type = options.type || CHART_TYPE.BAR;
|
|
10
|
+
this.type = options.type || _constants.CHART_TYPE.BAR;
|
|
5
11
|
this.table_id = options.table_id || null;
|
|
6
12
|
this.filters = options.filters || [];
|
|
7
13
|
this.filter_conjunction = options.filter_conjunction || 'And';
|
|
@@ -10,4 +16,5 @@ export default class BaseModel {
|
|
|
10
16
|
// default set to true
|
|
11
17
|
this.drill_down_status = typeof options.drill_down_status === 'boolean' ? options.drill_down_status : true;
|
|
12
18
|
}
|
|
13
|
-
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = BaseModel;
|
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _dtableUtils = require("dtable-utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class BasicNumberCard extends _baseModel.default {
|
|
5
12
|
constructor(options, tables) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.BASIC_NUMBER_CARD
|
|
15
|
+
type: _constants.CHART_TYPE.BASIC_NUMBER_CARD
|
|
9
16
|
});
|
|
10
17
|
this.name = options.name || '';
|
|
11
18
|
this.numeric_column_key = options.x_axis_column_key;
|
|
12
19
|
if (this.numeric_column_key && this.table_id && tables) {
|
|
13
|
-
const table = getTableById(tables, this.table_id);
|
|
14
|
-
const column = getTableColumnByKey(table, this.numeric_column_key);
|
|
15
|
-
if (!column || !isNumericColumn(column)) {
|
|
20
|
+
const table = (0, _dtableUtils.getTableById)(tables, this.table_id);
|
|
21
|
+
const column = (0, _dtableUtils.getTableColumnByKey)(table, this.numeric_column_key);
|
|
22
|
+
if (!column || !(0, _dtableUtils.isNumericColumn)(column)) {
|
|
16
23
|
this.numeric_column_key = null;
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
|
-
this.summary_type = options.x_axis_summary_type || CHART_Y_GROUP_TYPE.COUNT;
|
|
20
|
-
this.summary_method = options.y_axis_summary_method || CHART_SUMMARY_CALCULATION_METHOD[0];
|
|
26
|
+
this.summary_type = options.x_axis_summary_type || _constants.CHART_Y_GROUP_TYPE.COUNT;
|
|
27
|
+
this.summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_CALCULATION_METHOD[0];
|
|
21
28
|
this.font_size = options.font_size || 34;
|
|
22
29
|
this.font_color = options.font_color;
|
|
23
|
-
this.text_align = options.text_align || HORIZONTAL_ALIGN.LEFT;
|
|
30
|
+
this.text_align = options.text_align || _constants.HORIZONTAL_ALIGN.LEFT;
|
|
24
31
|
this.font_weight = options.font_weight || 700;
|
|
25
32
|
this.card_label_font_size = options.card_label_font_size || 14;
|
|
26
33
|
this.label_font_color = options.label_font_color;
|
|
27
|
-
this.label_text_align = options.text_align || HORIZONTAL_ALIGN.LEFT;
|
|
34
|
+
this.label_text_align = options.text_align || _constants.HORIZONTAL_ALIGN.LEFT;
|
|
28
35
|
this.label_font_weight = options.font_weight || 400;
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
|
-
|
|
38
|
+
var _default = exports.default = BasicNumberCard;
|
package/dist/model/chart.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _utils = require("../utils");
|
|
8
|
+
var _constants = require("../constants");
|
|
3
9
|
class ChartModel {
|
|
4
10
|
constructor(options, tables) {
|
|
5
11
|
// id is ChartModel id
|
|
@@ -12,14 +18,14 @@ class ChartModel {
|
|
|
12
18
|
} = options;
|
|
13
19
|
this.id = id;
|
|
14
20
|
this.type = 'statistic';
|
|
15
|
-
this.config = generateChartConfig(options, tables);
|
|
21
|
+
this.config = (0, _utils.generateChartConfig)(options, tables);
|
|
16
22
|
this.config._id = _id;
|
|
17
23
|
this.style_config = style_config || {};
|
|
18
24
|
this.style_config.title = {
|
|
19
25
|
text: '',
|
|
20
|
-
font_size: DEFAULT_CHART_TITLE_FONT_SIZE,
|
|
21
|
-
font_weight: DEFAULT_CHART_FONT_WEIGHT,
|
|
22
|
-
horizontal_align: HORIZONTAL_ALIGN.LEFT
|
|
26
|
+
font_size: _constants.DEFAULT_CHART_TITLE_FONT_SIZE,
|
|
27
|
+
font_weight: _constants.DEFAULT_CHART_FONT_WEIGHT,
|
|
28
|
+
horizontal_align: _constants.HORIZONTAL_ALIGN.LEFT
|
|
23
29
|
};
|
|
24
30
|
let tableList = tables;
|
|
25
31
|
if (!Array.isArray(tables)) {
|
|
@@ -32,4 +38,4 @@ class ChartModel {
|
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
|
-
|
|
41
|
+
var _default = exports.default = ChartModel;
|
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class Combination extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.COMBINATION
|
|
15
|
+
type: _constants.CHART_TYPE.COMBINATION
|
|
9
16
|
});
|
|
10
17
|
this.x_axis_column_key = options.x_axis_column_key;
|
|
11
18
|
this.x_axis_include_empty_cells = options.x_axis_include_empty_cells;
|
|
12
19
|
this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
13
20
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
14
|
-
this.y_axis_left_summary_type = options.y_axis_left_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
15
|
-
this.y_axis_right_summary_type = options.y_axis_right_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
16
|
-
this.y_axis_left_summary_method = options.y_axis_left_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
17
|
-
this.y_axis_right_summary_method = options.y_axis_right_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
21
|
+
this.y_axis_left_summary_type = options.y_axis_left_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
22
|
+
this.y_axis_right_summary_type = options.y_axis_right_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
23
|
+
this.y_axis_left_summary_method = options.y_axis_left_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
24
|
+
this.y_axis_right_summary_method = options.y_axis_right_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
18
25
|
this.y_axis_left_summary_column = options.y_axis_left_summary_column;
|
|
19
26
|
this.y_axis_right_summary_column = options.y_axis_right_summary_column;
|
|
20
|
-
this.y_axis_left_group_by_multiple_numeric_column = isBoolean(options.y_axis_left_group_by_multiple_numeric_column) ? options.y_axis_left_group_by_multiple_numeric_column : false;
|
|
27
|
+
this.y_axis_left_group_by_multiple_numeric_column = (0, _utils.isBoolean)(options.y_axis_left_group_by_multiple_numeric_column) ? options.y_axis_left_group_by_multiple_numeric_column : false;
|
|
21
28
|
this.y_axis_left_group_by_numeric_columns = options.y_axis_left_group_by_numeric_columns;
|
|
22
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
29
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
23
30
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
24
31
|
this.show_y_axis_left_label = options.show_y_axis_left_label;
|
|
25
32
|
this.show_y_axis_right_label = options.show_y_axis_right_label;
|
|
@@ -31,10 +38,10 @@ class Combination extends BaseModel {
|
|
|
31
38
|
this.y_axis_auto_range_right = options.y_axis_auto_range_right;
|
|
32
39
|
this.y_axis_min_right = options.y_axis_min_right;
|
|
33
40
|
this.y_axis_max_right = options.y_axis_max_right;
|
|
34
|
-
this.display_data_field = options.display_data_field || COMBINATION_DISPLAY_FIELDS.RIGHT;
|
|
35
|
-
this.display_data = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
41
|
+
this.display_data_field = options.display_data_field || _constants.COMBINATION_DISPLAY_FIELDS.RIGHT;
|
|
42
|
+
this.display_data = (0, _utils.isBoolean)(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
36
43
|
this.label_font_size = options.label_font_size;
|
|
37
|
-
this.line_type = options.line_type || CHART_LINE_TYPES[1];
|
|
44
|
+
this.line_type = options.line_type || _constants.CHART_LINE_TYPES[1];
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
|
-
|
|
47
|
+
var _default = exports.default = Combination;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _dtableUtils = require("dtable-utils");
|
|
9
|
+
var _utils = require("../utils");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
12
|
+
class CompareBar extends _baseModel.default {
|
|
6
13
|
constructor(options, tables) {
|
|
7
14
|
super({
|
|
8
15
|
...options,
|
|
9
|
-
type: CHART_TYPE.COMPARE_BAR
|
|
16
|
+
type: _constants.CHART_TYPE.COMPARE_BAR
|
|
10
17
|
});
|
|
11
18
|
this.x_axis_column_key = options.x_axis_column_key;
|
|
12
19
|
if (this.x_axis_column_key && this.table_id && tables) {
|
|
13
|
-
const table = getTableById(tables, this.table_id);
|
|
14
|
-
const column = getTableColumnByKey(table, this.x_axis_column_key);
|
|
15
|
-
if (!column || !isDateColumn(column)) {
|
|
20
|
+
const table = (0, _dtableUtils.getTableById)(tables, this.table_id);
|
|
21
|
+
const column = (0, _dtableUtils.getTableColumnByKey)(table, this.x_axis_column_key);
|
|
22
|
+
if (!column || !(0, _dtableUtils.isDateColumn)(column)) {
|
|
16
23
|
this.x_axis_column_key = null;
|
|
17
24
|
}
|
|
18
25
|
}
|
|
@@ -21,8 +28,8 @@ class CompareBar extends BaseModel {
|
|
|
21
28
|
this.x_axis_date_range_end = options.x_axis_date_range_end;
|
|
22
29
|
this.x_axis_compared_date_range_start = options.x_axis_compared_date_range_start;
|
|
23
30
|
this.x_axis_compared_date_range_end = options.x_axis_compared_date_range_end;
|
|
24
|
-
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
-
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
31
|
+
this.x_axis_show_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
32
|
+
this.y_axis_show_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
26
33
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
27
34
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
28
35
|
this.y_axis_compare_label_color = options.y_axis_compare_label_color;
|
|
@@ -30,10 +37,10 @@ class CompareBar extends BaseModel {
|
|
|
30
37
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
31
38
|
this.y_axis_summary_type = options.y_axis_summary_type || 'count';
|
|
32
39
|
this.y_axis_summary_method = options.y_axis_summary_method;
|
|
33
|
-
this.display_increase = isBoolean(options.display_increase) ? options.display_increase : false;
|
|
34
|
-
this.display_increase_percentage = isBoolean(options.display_increase_percentage) ? options.display_increase_percentage : false;
|
|
40
|
+
this.display_increase = (0, _utils.isBoolean)(options.display_increase) ? options.display_increase : false;
|
|
41
|
+
this.display_increase_percentage = (0, _utils.isBoolean)(options.display_increase_percentage) ? options.display_increase_percentage : false;
|
|
35
42
|
this.increase_display_color = options.increase_display_color;
|
|
36
43
|
this.label_font_size = options.label_font_size;
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
|
-
|
|
46
|
+
var _default = exports.default = CompareBar;
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _constants = require("../constants");
|
|
9
|
+
var _utils = require("../utils");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class CompletenessGroup extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.COMPLETENESS_GROUP
|
|
15
|
+
type: _constants.CHART_TYPE.COMPLETENESS_GROUP
|
|
9
16
|
});
|
|
10
17
|
this.groupby_column_key = options.x_axis_column_key;
|
|
11
18
|
this.completed_column_key = options.completed_column_key;
|
|
12
19
|
this.target_column_key = options.target_column_key;
|
|
13
|
-
this.completed_color = options.completed_color || LABEL_COLORS[0];
|
|
14
|
-
this.display_percentage = isBoolean(options.display_percentage) ? options.display_percentage : true;
|
|
20
|
+
this.completed_color = options.completed_color || _constants.LABEL_COLORS[0];
|
|
21
|
+
this.display_percentage = (0, _utils.isBoolean)(options.display_percentage) ? options.display_percentage : true;
|
|
15
22
|
this.label_font_size = options.label_font_size;
|
|
16
23
|
this.column_groupby_column_key = options.column_groupby_column_key;
|
|
17
24
|
this.date_granularity = options.column_groupby_date_granularity;
|
|
18
25
|
this.geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
19
26
|
|
|
20
27
|
// x_axis is groupby axis
|
|
21
|
-
this.x_axis_include_empty_cells = isBoolean(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
22
|
-
this.show_percentage = isBoolean(options.show_percentage) ? options.show_percentage : true;
|
|
28
|
+
this.x_axis_include_empty_cells = (0, _utils.isBoolean)(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
29
|
+
this.show_percentage = (0, _utils.isBoolean)(options.show_percentage) ? options.show_percentage : true;
|
|
23
30
|
this.label_font_size = options.label_font_size || 12;
|
|
24
|
-
this.y_axis_auto_range = isBoolean(options.y_axis_auto_range) ? options.y_axis_auto_range : true;
|
|
31
|
+
this.y_axis_auto_range = (0, _utils.isBoolean)(options.y_axis_auto_range) ? options.y_axis_auto_range : true;
|
|
25
32
|
// default to null
|
|
26
33
|
this.y_axis_min = options.y_axis_min;
|
|
27
34
|
this.y_axis_max = options.y_axis_max;
|
|
28
35
|
}
|
|
29
36
|
}
|
|
30
|
-
|
|
37
|
+
var _default = exports.default = CompletenessGroup;
|