sea-chart 2.0.37 → 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 +20 -69
- package/dist/assets/css/sea-chart-d3-tooltip.css +0 -1
- 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 +31 -37
- 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 +41 -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 +12 -23
- package/dist/components/index.js +7 -48
- package/dist/components/loading/index.js +6 -13
- package/dist/components/number-input/index.js +11 -24
- package/dist/components/pixel-editor/index.js +15 -23
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +13 -16
- package/dist/components/popover/hide-column-popover/hide-column-popover.css +5 -1
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +28 -38
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +9 -18
- package/dist/components/popover/sort-popover/sort-popover.js +58 -69
- 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 +61 -68
- package/dist/components/tooltip/index.js +39 -28
- 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 +13 -16
- 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 +2 -7
- package/dist/locale/lang/en.js +2 -7
- package/dist/locale/lang/es.js +2 -7
- package/dist/locale/lang/fr.js +2 -7
- package/dist/locale/lang/pt.js +2 -7
- package/dist/locale/lang/ru.js +2 -7
- package/dist/locale/lang/zh_CN.js +2 -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 +14 -17
- 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 +14 -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 +66 -73
- 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 +51 -59
- package/dist/settings/basic-number-card/data-settings.js +50 -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 -64
- package/dist/settings/combination-settings/index.js +3 -20
- package/dist/settings/combination-settings/style-settings.js +67 -75
- 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 +44 -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 +22 -30
- 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 +57 -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 +49 -58
- package/dist/settings/table-element-settings/data-settings.js +21 -29
- package/dist/settings/table-element-settings/index.css +1 -31
- package/dist/settings/table-element-settings/index.js +2 -13
- package/dist/settings/table-settings/data-settings.js +113 -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 +44 -52
- 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 +59 -66
- 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 +27 -34
- package/dist/settings/widgets/data-filter/index.js +59 -59
- 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 +52 -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 +75 -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 +65 -72
- package/dist/utils/cell-format-utils.js +25 -33
- package/dist/utils/cell-value-utils.js +4 -11
- package/dist/utils/chart-utils/base-utils.js +467 -367
- package/dist/utils/chart-utils/index.js +29 -40
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +78 -85
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +20 -21
- 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 +28 -26
- 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 +94 -97
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +19 -25
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +50 -36
- package/dist/utils/chart-utils/sql-statistics-utils.js +385 -388
- 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 +88 -102
- package/dist/utils/common-utils.js +28 -53
- package/dist/utils/concurrency-manager.js +1 -7
- package/dist/utils/contexts.js +7 -11
- 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 +73 -219
- 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 +251 -183
- 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 +162 -172
- package/dist/utils/sql/index.js +3 -27
- package/dist/utils/trend-utils.js +50 -45
- package/dist/view/index.css +2 -8
- package/dist/view/index.js +102 -103
- package/dist/view/title/index.js +16 -24
- package/dist/view/wrapper/area-group.js +57 -57
- package/dist/view/wrapper/area.js +43 -51
- package/dist/view/wrapper/bar-compare.js +56 -48
- package/dist/view/wrapper/bar-custom-stack.js +73 -55
- package/dist/view/wrapper/bar-group.js +94 -73
- package/dist/view/wrapper/bar-stack.js +49 -57
- package/dist/view/wrapper/bar.js +40 -48
- package/dist/view/wrapper/basic-number-card.js +50 -34
- package/dist/view/wrapper/chart-component.js +164 -569
- package/dist/view/wrapper/combination.js +55 -63
- package/dist/view/wrapper/completeness-group.js +140 -93
- package/dist/view/wrapper/completeness.js +36 -44
- package/dist/view/wrapper/dashboard.js +104 -59
- 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 +70 -58
- package/dist/view/wrapper/horizontal-bar-stack.js +48 -56
- package/dist/view/wrapper/horizontal-bar.js +41 -49
- package/dist/view/wrapper/index.js +107 -115
- package/dist/view/wrapper/line-group.js +49 -52
- 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 +40 -47
- package/dist/view/wrapper/map-world.js +42 -49
- package/dist/view/wrapper/map.js +42 -50
- package/dist/view/wrapper/mirror.js +41 -49
- package/dist/view/wrapper/pie.js +45 -53
- package/dist/view/wrapper/ring.js +50 -58
- package/dist/view/wrapper/scatter.js +50 -56
- 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 -92
- 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 -16
- 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 +8 -13
- 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 +30 -43
- package/dist/view/wrapper/treemap.js +38 -46
- package/dist/view/wrapper/trend.js +80 -65
- package/package.json +15 -12
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 HorizontalGroupBar extends _baseModel.default {
|
|
1
|
+
import BaseModel from './base-model';
|
|
2
|
+
import { isBoolean } from '../utils';
|
|
3
|
+
import { CHART_TYPE, CHART_SUMMARY_TYPE } from '../constants';
|
|
4
|
+
class HorizontalGroupBar extends BaseModel {
|
|
12
5
|
constructor(options) {
|
|
13
6
|
super({
|
|
14
7
|
...options,
|
|
15
|
-
type:
|
|
8
|
+
type: CHART_TYPE.HORIZONTAL_GROUP_BAR
|
|
16
9
|
});
|
|
17
10
|
|
|
18
11
|
// vertical axis data
|
|
@@ -22,17 +15,17 @@ class HorizontalGroupBar extends _baseModel.default {
|
|
|
22
15
|
this.vertical_axis_include_empty = options.x_axis_include_empty_cells;
|
|
23
16
|
|
|
24
17
|
// vertical axis style
|
|
25
|
-
this.show_vertical_axis_label =
|
|
18
|
+
this.show_vertical_axis_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
26
19
|
this.vertical_axis_label_position = options.x_axis_label_position;
|
|
27
20
|
|
|
28
21
|
// horizontal axis data
|
|
29
|
-
this.horizontal_axis_summary_type = options.y_axis_summary_type ||
|
|
22
|
+
this.horizontal_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
30
23
|
this.horizontal_axis_column_key = options.y_axis_summary_column_key;
|
|
31
|
-
this.horizontal_axis_summary_method = options.y_axis_summary_method ||
|
|
24
|
+
this.horizontal_axis_summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
32
25
|
|
|
33
26
|
// horizontal axis style
|
|
34
27
|
this.horizontal_axis_label_color = options.y_axis_label_color;
|
|
35
|
-
this.show_horizontal_axis_label =
|
|
28
|
+
this.show_horizontal_axis_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
36
29
|
this.horizontal_axis_label_position = options.y_axis_label_position;
|
|
37
30
|
this.horizontal_axis_auto_range = options.y_axis_auto_range;
|
|
38
31
|
this.horizontal_axis_min = options.y_axis_min;
|
|
@@ -47,4 +40,4 @@ class HorizontalGroupBar extends _baseModel.default {
|
|
|
47
40
|
this.label_font_size = options.label_font_size;
|
|
48
41
|
}
|
|
49
42
|
}
|
|
50
|
-
|
|
43
|
+
export default HorizontalGroupBar;
|
package/dist/model/index.js
CHANGED
|
@@ -1,93 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
[_constants.CHART_TYPE.COMPLETENESS]: _completeness.default,
|
|
71
|
-
[_constants.CHART_TYPE.COMPLETENESS_GROUP]: _completenessGroup.default,
|
|
72
|
-
[_constants.CHART_TYPE.LINE]: _line.default,
|
|
73
|
-
[_constants.CHART_TYPE.LINE_GROUP]: _lineGroup.default,
|
|
74
|
-
[_constants.CHART_TYPE.AREA]: _area.default,
|
|
75
|
-
[_constants.CHART_TYPE.AREA_GROUP]: _areaGroup.default,
|
|
76
|
-
[_constants.CHART_TYPE.PIE]: _pie.default,
|
|
77
|
-
[_constants.CHART_TYPE.RING]: _ring.default,
|
|
78
|
-
[_constants.CHART_TYPE.SCATTER]: _scatter.default,
|
|
79
|
-
[_constants.CHART_TYPE.COMBINATION]: _combination.default,
|
|
80
|
-
[_constants.CHART_TYPE.MAP]: _map.default,
|
|
81
|
-
[_constants.CHART_TYPE.MAP_BUBBLE]: _mapBubble.default,
|
|
82
|
-
[_constants.CHART_TYPE.WORLD_MAP]: _worldMap.default,
|
|
83
|
-
[_constants.CHART_TYPE.WORLD_MAP_BUBBLE]: _worldMapBubble.default,
|
|
84
|
-
[_constants.CHART_TYPE.HEAT_MAP]: _heatMap.default,
|
|
85
|
-
[_constants.CHART_TYPE.MIRROR]: _mirror.default,
|
|
86
|
-
[_constants.CHART_TYPE.BASIC_NUMBER_CARD]: _basicNumberCard.default,
|
|
87
|
-
[_constants.CHART_TYPE.TREND]: _trend.default,
|
|
88
|
-
[_constants.CHART_TYPE.DASHBOARD]: _dashboard.default,
|
|
89
|
-
[_constants.CHART_TYPE.TREE_MAP]: _treeMap.default,
|
|
90
|
-
[_constants.CHART_TYPE.TABLE]: _table.default,
|
|
91
|
-
[_constants.CHART_TYPE.FUNNEL]: _funnel.default,
|
|
92
|
-
[_constants.CHART_TYPE.TABLE_ELEMENT]: _tableElement.default
|
|
93
|
-
};
|
|
1
|
+
import { CHART_TYPE } from '../constants';
|
|
2
|
+
import ChartModel from './chart';
|
|
3
|
+
import User from './user';
|
|
4
|
+
import GenericModel from './generic-model';
|
|
5
|
+
import Bar from './bar';
|
|
6
|
+
import BarGroup from './bar-group';
|
|
7
|
+
import BarStack from './bar-stack';
|
|
8
|
+
import CompareBar from './compare-bar';
|
|
9
|
+
import BarCustom from './bar-custom';
|
|
10
|
+
import HorizontalBar from './horizontal-bar';
|
|
11
|
+
import HorizontalGroupBar from './horizontal-group-bar';
|
|
12
|
+
import StackedHorizontalBar from './stacked-horizontal-bar';
|
|
13
|
+
import Completeness from './completeness';
|
|
14
|
+
import CompletenessGroup from './completeness-group';
|
|
15
|
+
import Line from './line';
|
|
16
|
+
import LineGroup from './line-group';
|
|
17
|
+
import Area from './area';
|
|
18
|
+
import AreaGroup from './area-group';
|
|
19
|
+
import Pie from './pie';
|
|
20
|
+
import Ring from './ring';
|
|
21
|
+
import Combination from './combination';
|
|
22
|
+
import Map from './map';
|
|
23
|
+
import MapBubble from './map-bubble';
|
|
24
|
+
import WorldMap from './world-map';
|
|
25
|
+
import WorldMapBubble from './world-map-bubble';
|
|
26
|
+
import Scatter from './scatter';
|
|
27
|
+
import HeatMap from './heat-map';
|
|
28
|
+
import TreeMap from './tree-map';
|
|
29
|
+
import Mirror from './mirror';
|
|
30
|
+
import BasicNumberCard from './basic-number-card';
|
|
31
|
+
import Trend from './trend';
|
|
32
|
+
import Dashboard from './dashboard';
|
|
33
|
+
import Table from './table';
|
|
34
|
+
import Funnel from './funnel';
|
|
35
|
+
import TableElement from './table-element';
|
|
36
|
+
const CHART_MAP = {
|
|
37
|
+
[CHART_TYPE.BAR]: Bar,
|
|
38
|
+
[CHART_TYPE.BAR_GROUP]: BarGroup,
|
|
39
|
+
[CHART_TYPE.BAR_STACK]: BarStack,
|
|
40
|
+
[CHART_TYPE.COMPARE_BAR]: CompareBar,
|
|
41
|
+
[CHART_TYPE.BAR_CUSTOM]: BarCustom,
|
|
42
|
+
[CHART_TYPE.HORIZONTAL_BAR]: HorizontalBar,
|
|
43
|
+
[CHART_TYPE.HORIZONTAL_GROUP_BAR]: HorizontalGroupBar,
|
|
44
|
+
[CHART_TYPE.STACKED_HORIZONTAL_BAR]: StackedHorizontalBar,
|
|
45
|
+
[CHART_TYPE.COMPLETENESS]: Completeness,
|
|
46
|
+
[CHART_TYPE.COMPLETENESS_GROUP]: CompletenessGroup,
|
|
47
|
+
[CHART_TYPE.LINE]: Line,
|
|
48
|
+
[CHART_TYPE.LINE_GROUP]: LineGroup,
|
|
49
|
+
[CHART_TYPE.AREA]: Area,
|
|
50
|
+
[CHART_TYPE.AREA_GROUP]: AreaGroup,
|
|
51
|
+
[CHART_TYPE.PIE]: Pie,
|
|
52
|
+
[CHART_TYPE.RING]: Ring,
|
|
53
|
+
[CHART_TYPE.SCATTER]: Scatter,
|
|
54
|
+
[CHART_TYPE.COMBINATION]: Combination,
|
|
55
|
+
[CHART_TYPE.MAP]: Map,
|
|
56
|
+
[CHART_TYPE.MAP_BUBBLE]: MapBubble,
|
|
57
|
+
[CHART_TYPE.WORLD_MAP]: WorldMap,
|
|
58
|
+
[CHART_TYPE.WORLD_MAP_BUBBLE]: WorldMapBubble,
|
|
59
|
+
[CHART_TYPE.HEAT_MAP]: HeatMap,
|
|
60
|
+
[CHART_TYPE.MIRROR]: Mirror,
|
|
61
|
+
[CHART_TYPE.BASIC_NUMBER_CARD]: BasicNumberCard,
|
|
62
|
+
[CHART_TYPE.TREND]: Trend,
|
|
63
|
+
[CHART_TYPE.DASHBOARD]: Dashboard,
|
|
64
|
+
[CHART_TYPE.TREE_MAP]: TreeMap,
|
|
65
|
+
[CHART_TYPE.TABLE]: Table,
|
|
66
|
+
[CHART_TYPE.FUNNEL]: Funnel,
|
|
67
|
+
[CHART_TYPE.TABLE_ELEMENT]: TableElement
|
|
68
|
+
};
|
|
69
|
+
export { ChartModel, GenericModel, CHART_MAP, User };
|
package/dist/model/line-group.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 LineGroup extends _baseModel.default {
|
|
1
|
+
import { isBoolean } from '../utils';
|
|
2
|
+
import { CHART_TYPE, CHART_SUMMARY_TYPE, CHART_LINE_TYPES } from '../constants';
|
|
3
|
+
import BaseModel from './base-model';
|
|
4
|
+
class LineGroup extends BaseModel {
|
|
12
5
|
constructor(options) {
|
|
13
6
|
super({
|
|
14
7
|
...options,
|
|
15
|
-
type:
|
|
8
|
+
type: CHART_TYPE.LINE_GROUP
|
|
16
9
|
});
|
|
17
10
|
|
|
18
11
|
// x axis data
|
|
@@ -22,17 +15,17 @@ class LineGroup extends _baseModel.default {
|
|
|
22
15
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
23
16
|
|
|
24
17
|
// x axis style
|
|
25
|
-
this.x_axis_show_label =
|
|
18
|
+
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
26
19
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
27
20
|
|
|
28
21
|
// y axis data
|
|
29
22
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
30
|
-
this.y_axis_summary_type = options.y_axis_summary_type ||
|
|
31
|
-
this.y_axis_summary_method = options.y_axis_summary_method ||
|
|
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;
|
|
32
25
|
|
|
33
26
|
// y axis style
|
|
34
|
-
this.y_axis_show_value =
|
|
35
|
-
this.y_axis_show_label =
|
|
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;
|
|
36
29
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
37
30
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
38
31
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -43,10 +36,10 @@ class LineGroup extends _baseModel.default {
|
|
|
43
36
|
this.column_groupby_column_key = options.column_groupby_column_key;
|
|
44
37
|
this.column_groupby_date_granularity = options.column_groupby_date_granularity;
|
|
45
38
|
this.column_groupby_geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
46
|
-
this.column_groupby_multiple_numeric_column =
|
|
39
|
+
this.column_groupby_multiple_numeric_column = isBoolean(options.column_groupby_multiple_numeric_column) ? options.column_groupby_multiple_numeric_column : false;
|
|
47
40
|
this.summary_columns = options.summary_columns;
|
|
48
41
|
this.label_font_size = options.label_font_size;
|
|
49
|
-
this.line_type = options.line_type ||
|
|
42
|
+
this.line_type = options.line_type || CHART_LINE_TYPES[1];
|
|
50
43
|
}
|
|
51
44
|
}
|
|
52
|
-
|
|
45
|
+
export default LineGroup;
|
package/dist/model/line.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 Line extends _baseModel.default {
|
|
1
|
+
import { isBoolean } from '../utils';
|
|
2
|
+
import { CHART_TYPE, CHART_SUMMARY_TYPE, CHART_LINE_TYPES } from '../constants';
|
|
3
|
+
import BaseModel from './base-model';
|
|
4
|
+
class Line extends BaseModel {
|
|
12
5
|
constructor(options) {
|
|
13
6
|
super({
|
|
14
7
|
...options,
|
|
15
|
-
type:
|
|
8
|
+
type: CHART_TYPE.LINE
|
|
16
9
|
});
|
|
17
10
|
|
|
18
11
|
// x axis data
|
|
@@ -22,17 +15,17 @@ class Line extends _baseModel.default {
|
|
|
22
15
|
this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
23
16
|
|
|
24
17
|
// x axis style
|
|
25
|
-
this.x_axis_show_label =
|
|
18
|
+
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
26
19
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
27
20
|
|
|
28
21
|
// y axis data
|
|
29
22
|
this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
30
|
-
this.y_axis_summary_type = options.y_axis_summary_type ||
|
|
31
|
-
this.y_axis_summary_method = options.y_axis_summary_method ||
|
|
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;
|
|
32
25
|
|
|
33
26
|
// y axis style
|
|
34
|
-
this.y_axis_show_value =
|
|
35
|
-
this.y_axis_show_label =
|
|
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;
|
|
36
29
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
37
30
|
this.y_axis_auto_range = options.y_axis_auto_range;
|
|
38
31
|
this.y_axis_min = options.y_axis_min;
|
|
@@ -40,7 +33,7 @@ class Line extends _baseModel.default {
|
|
|
40
33
|
this.y_axis_label_color = options.y_axis_label_color;
|
|
41
34
|
this.sort_type = options.sort_type;
|
|
42
35
|
this.label_font_size = options.label_font_size;
|
|
43
|
-
this.line_type = options.line_type ||
|
|
36
|
+
this.line_type = options.line_type || CHART_LINE_TYPES[1];
|
|
44
37
|
}
|
|
45
38
|
}
|
|
46
|
-
|
|
39
|
+
export default Line;
|
package/dist/model/map-bubble.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 MapBubble extends _baseModel.default {
|
|
1
|
+
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
2
|
+
import { isStatisticMapColumn } from '../utils';
|
|
3
|
+
import { CHART_TYPE, MAP_LEVEL, regions } from '../constants';
|
|
4
|
+
import BaseModel from './base-model';
|
|
5
|
+
class MapBubble extends BaseModel {
|
|
13
6
|
constructor(options, tables) {
|
|
14
7
|
super({
|
|
15
8
|
...options,
|
|
16
|
-
type:
|
|
9
|
+
type: CHART_TYPE.MAP_BUBBLE
|
|
17
10
|
});
|
|
18
11
|
this.geo_column_key = options.x_axis_column_key;
|
|
19
12
|
if (this.geo_column_key && this.table_id && tables) {
|
|
20
|
-
const table =
|
|
21
|
-
const column =
|
|
22
|
-
if (!
|
|
13
|
+
const table = getTableById(tables, this.table_id);
|
|
14
|
+
const column = getTableColumnByKey(table, this.geo_column_key);
|
|
15
|
+
if (!isStatisticMapColumn(column)) {
|
|
23
16
|
this.geo_column_key = null;
|
|
24
17
|
}
|
|
25
18
|
}
|
|
26
19
|
this.geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
20
|
+
this.map_level = options.map_level || MAP_LEVEL.COUNTRY;
|
|
21
|
+
this.map_location = options.map_location || {
|
|
22
|
+
province: regions[0].name
|
|
23
|
+
};
|
|
27
24
|
this.summary_type = options.y_axis_summary_type || 'count';
|
|
28
25
|
this.summary_method = options.y_axis_summary_method;
|
|
29
26
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
@@ -31,4 +28,4 @@ class MapBubble extends _baseModel.default {
|
|
|
31
28
|
this.legend_size = options.legend_size;
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
|
-
|
|
31
|
+
export default MapBubble;
|
package/dist/model/map.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 Map extends _baseModel.default {
|
|
1
|
+
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
2
|
+
import { isStatisticMapColumn } from '../utils';
|
|
3
|
+
import { CHART_TYPE, MAP_LEVEL, regions } from '../constants';
|
|
4
|
+
import BaseModel from './base-model';
|
|
5
|
+
class Map extends BaseModel {
|
|
13
6
|
constructor(options, tables) {
|
|
14
7
|
super({
|
|
15
8
|
...options,
|
|
16
|
-
type:
|
|
9
|
+
type: CHART_TYPE.MAP
|
|
17
10
|
});
|
|
18
11
|
this.geo_column_key = options.x_axis_column_key;
|
|
19
12
|
if (this.geo_column_key && this.table_id && tables) {
|
|
20
|
-
const table =
|
|
21
|
-
const column =
|
|
22
|
-
if (!
|
|
13
|
+
const table = getTableById(tables, this.table_id);
|
|
14
|
+
const column = getTableColumnByKey(table, this.geo_column_key);
|
|
15
|
+
if (!isStatisticMapColumn(column)) {
|
|
23
16
|
this.geo_column_key = null;
|
|
24
17
|
}
|
|
25
18
|
}
|
|
26
|
-
this.map_level = options.map_level ||
|
|
19
|
+
this.map_level = options.map_level || MAP_LEVEL.COUNTRY;
|
|
27
20
|
this.map_location = options.map_location || {
|
|
28
|
-
province:
|
|
21
|
+
province: regions[0].name
|
|
29
22
|
};
|
|
30
23
|
this.summary_type = options.y_axis_summary_type || 'count';
|
|
31
24
|
this.summary_method = options.y_axis_summary_method;
|
|
@@ -34,4 +27,4 @@ class Map extends _baseModel.default {
|
|
|
34
27
|
this.legend_size = options.legend_size;
|
|
35
28
|
}
|
|
36
29
|
}
|
|
37
|
-
|
|
30
|
+
export default Map;
|
package/dist/model/mirror.js
CHANGED
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 Mirror extends _baseModel.default {
|
|
1
|
+
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
2
|
+
import { isBoolean, isStatisticMirrorColumn } from '../utils';
|
|
3
|
+
import { CHART_TYPE, CHART_SUMMARY_TYPE } from '../constants';
|
|
4
|
+
import BaseModel from './base-model';
|
|
5
|
+
class Mirror extends BaseModel {
|
|
13
6
|
constructor(options, tables) {
|
|
14
7
|
super({
|
|
15
8
|
...options,
|
|
16
|
-
type:
|
|
9
|
+
type: CHART_TYPE.MIRROR
|
|
17
10
|
});
|
|
18
11
|
this.column_key = options.x_axis_column_key;
|
|
19
12
|
if (this.column && this.table_id && tables) {
|
|
20
|
-
const table =
|
|
21
|
-
const column =
|
|
22
|
-
if (!
|
|
13
|
+
const table = getTableById(tables, this.table_id);
|
|
14
|
+
const column = getTableColumnByKey(table, this.column_key);
|
|
15
|
+
if (!isStatisticMirrorColumn(column)) {
|
|
23
16
|
this.column_key = null;
|
|
24
17
|
}
|
|
25
18
|
}
|
|
26
|
-
this.is_transpose =
|
|
19
|
+
this.is_transpose = isBoolean(options.is_transpose) ? options.is_transpose : false;
|
|
27
20
|
this.group_column_key = options.column_groupby_column_key;
|
|
28
21
|
this.summary_method = options.y_axis_summary_method;
|
|
29
22
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
30
23
|
this.summary_type = options.y_axis_summary_type || 'count';
|
|
31
|
-
if (this.summary_method ===
|
|
32
|
-
this.summary_method =
|
|
24
|
+
if (this.summary_method === CHART_SUMMARY_TYPE.ROW_COUNT) {
|
|
25
|
+
this.summary_method = CHART_SUMMARY_TYPE.MAX;
|
|
33
26
|
}
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
|
-
|
|
29
|
+
export default Mirror;
|
package/dist/model/pie.js
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 Pie extends _baseModel.default {
|
|
1
|
+
import BaseModel from './base-model';
|
|
2
|
+
import { isBoolean } from '../utils';
|
|
3
|
+
import { CHART_TYPE, CHART_LABEL_POSITIONS, CHART_LABEL_FORMATS, CHART_SUMMARY_TYPE } from '../constants';
|
|
4
|
+
class Pie extends BaseModel {
|
|
12
5
|
constructor(options) {
|
|
13
6
|
super({
|
|
14
7
|
...options,
|
|
15
|
-
type:
|
|
8
|
+
type: CHART_TYPE.PIE
|
|
16
9
|
});
|
|
17
10
|
this.groupby_column_key = options.x_axis_column_key;
|
|
18
11
|
this.groupby_date_granularity = options.x_axis_date_granularity;
|
|
19
12
|
this.groupby_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
20
13
|
this.groupby_include_empty_cells = options.x_axis_include_empty_cells;
|
|
21
14
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
22
|
-
this.summary_type = options.y_axis_summary_type ||
|
|
23
|
-
this.summary_method = options.y_axis_summary_method ||
|
|
24
|
-
this.show_legend =
|
|
25
|
-
this.display_label =
|
|
26
|
-
this.label_position = options.label_position ||
|
|
27
|
-
this.label_format = options.label_format ||
|
|
15
|
+
this.summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
16
|
+
this.summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
17
|
+
this.show_legend = isBoolean(options.show_legend) ? options.show_legend : true;
|
|
18
|
+
this.display_label = isBoolean(options.display_label) ? options.display_label : true;
|
|
19
|
+
this.label_position = options.label_position || CHART_LABEL_POSITIONS[0];
|
|
20
|
+
this.label_format = options.label_format || CHART_LABEL_FORMATS[0];
|
|
28
21
|
this.minimum_slice_percent = options.minimum_slice_percent;
|
|
29
22
|
this.sort_type = options.sort_type;
|
|
30
23
|
this.label_font_size = options.label_font_size;
|
|
31
24
|
}
|
|
32
25
|
}
|
|
33
|
-
|
|
26
|
+
export default Pie;
|
package/dist/model/ring.js
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 Ring extends _baseModel.default {
|
|
1
|
+
import { isBoolean } from '../utils';
|
|
2
|
+
import { CHART_TYPE, CHART_LABEL_POSITIONS, CHART_LABEL_FORMATS, CHART_SUMMARY_TYPE } from '../constants';
|
|
3
|
+
import BaseModel from './base-model';
|
|
4
|
+
class Ring extends BaseModel {
|
|
12
5
|
constructor(options) {
|
|
13
6
|
super({
|
|
14
7
|
...options,
|
|
15
|
-
type:
|
|
8
|
+
type: CHART_TYPE.RING
|
|
16
9
|
});
|
|
17
10
|
this.groupby_column_key = options.x_axis_column_key;
|
|
18
11
|
this.groupby_date_granularity = options.x_axis_date_granularity;
|
|
19
12
|
this.groupby_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
20
13
|
this.groupby_include_empty_cells = options.x_axis_include_empty_cells;
|
|
21
14
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
22
|
-
this.summary_type = options.y_axis_summary_type ||
|
|
23
|
-
this.summary_method = options.y_axis_summary_method ||
|
|
24
|
-
this.show_legend =
|
|
25
|
-
this.display_label =
|
|
26
|
-
this.label_position = options.label_position ||
|
|
27
|
-
this.label_format = options.label_format ||
|
|
15
|
+
this.summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
16
|
+
this.summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
17
|
+
this.show_legend = isBoolean(options.show_legend) ? options.show_legend : true;
|
|
18
|
+
this.display_label = isBoolean(options.display_label) ? options.display_label : true;
|
|
19
|
+
this.label_position = options.label_position || CHART_LABEL_POSITIONS[0];
|
|
20
|
+
this.label_format = options.label_format || CHART_LABEL_FORMATS[0];
|
|
28
21
|
this.minimum_slice_percent = options.minimum_slice_percent;
|
|
29
22
|
this.sort_type = options.sort_type;
|
|
30
23
|
this.label_font_size = options.label_font_size;
|
|
31
24
|
this.show_annotation = options.show_annotation || true;
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
|
-
|
|
27
|
+
export default Ring;
|
package/dist/model/scatter.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 Scatter extends _baseModel.default {
|
|
1
|
+
import BaseModel from './base-model';
|
|
2
|
+
import { isBoolean } from '../utils';
|
|
3
|
+
import { CHART_TYPE } from '../constants';
|
|
4
|
+
class Scatter extends BaseModel {
|
|
12
5
|
constructor(options) {
|
|
13
6
|
super({
|
|
14
7
|
...options,
|
|
15
|
-
type:
|
|
8
|
+
type: CHART_TYPE.SCATTER
|
|
16
9
|
});
|
|
17
10
|
this.x_axis_column_key = options.x_axis_column_key;
|
|
18
11
|
this.y_axis_column_key = options.y_axis_column_key;
|
|
19
12
|
this.column_groupby_column_key = options.column_groupby_column_key;
|
|
20
13
|
this.date_granularity = options.date_granularity;
|
|
21
14
|
this.geolocation_granularity = options.geolocation_granularity;
|
|
22
|
-
this.y_axis_auto_range =
|
|
23
|
-
this.x_axis_show_label =
|
|
15
|
+
this.y_axis_auto_range = isBoolean(options.y_axis_auto_range) ? options.y_axis_auto_range : true;
|
|
16
|
+
this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
24
17
|
this.x_axis_label_position = options.x_axis_label_position;
|
|
25
|
-
this.y_axis_show_label =
|
|
18
|
+
this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
26
19
|
this.y_axis_label_position = options.y_axis_label_position;
|
|
27
20
|
this.label_font_size = options.label_font_size;
|
|
28
|
-
this.y_axis_show_value =
|
|
21
|
+
this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
29
22
|
}
|
|
30
23
|
}
|
|
31
|
-
|
|
24
|
+
export default Scatter;
|