sea-chart 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -1
- package/dist/api/index.js +101 -0
- package/{lib → dist}/components/collaborator/index.js +8 -6
- package/{lib → dist}/components/icon/index.css +1 -1
- package/{lib → dist}/components/icon/index.js +7 -5
- package/dist/components/index.js +8 -0
- package/{lib → dist}/components/loading/index.js +4 -2
- package/dist/components/number-input/index.js +31 -0
- package/{lib → dist}/components/pixel-editor/index.css +4 -4
- package/{lib → dist}/components/pixel-editor/index.js +11 -15
- package/{lib → dist}/components/select-group/index.css +10 -10
- package/dist/components/select-group/index.js +52 -0
- package/dist/components/types-dialog/index.css +97 -0
- package/dist/components/types-dialog/index.js +117 -0
- package/{lib → dist}/constants/geolocation.js +3 -3
- package/dist/constants/index.js +184 -0
- package/{lib → dist}/constants/model.js +25 -5
- package/dist/constants/style.js +15 -0
- package/dist/constants/type-image.js +59 -0
- package/dist/constants/type.js +124 -0
- package/dist/context.js +83 -0
- package/dist/editor/index.js +41 -0
- package/dist/index.js +9 -0
- package/dist/intl.js +37 -0
- package/dist/locale/index.js +18 -0
- package/{lib → dist}/locale/lang/de.js +1 -1
- package/{lib → dist}/locale/lang/en.js +1 -1
- package/{lib → dist}/locale/lang/es.js +1 -1
- package/{lib → dist}/locale/lang/fr.js +1 -1
- package/{lib → dist}/locale/lang/pt.js +1 -1
- package/{lib → dist}/locale/lang/ru.js +1 -1
- package/{lib → dist}/locale/lang/zh_CN.js +1 -1
- package/dist/model/area-group.js +41 -0
- package/dist/model/area.js +32 -0
- package/dist/model/bar-group.js +44 -0
- package/dist/model/bar-stack.js +41 -0
- package/dist/model/bar.js +38 -0
- package/dist/model/base-model.js +9 -0
- package/dist/model/basic-number-card.js +22 -0
- package/dist/model/chart.js +23 -0
- package/dist/model/combination.js +38 -0
- package/dist/model/compare-bar.js +39 -0
- package/dist/model/completeness-group.js +24 -0
- package/dist/model/completeness.js +18 -0
- package/dist/model/dashboard.js +16 -0
- package/dist/model/generic-model.js +224 -0
- package/dist/model/heat-map.js +23 -0
- package/dist/model/horizontal-bar.js +38 -0
- package/dist/model/horizontal-group-bar.js +43 -0
- package/dist/model/index.js +63 -0
- package/dist/model/line-group.js +44 -0
- package/dist/model/line.js +38 -0
- package/dist/model/map-bubble.js +27 -0
- package/dist/model/map.js +27 -0
- package/dist/model/mirror.js +26 -0
- package/dist/model/pie.js +26 -0
- package/dist/model/ring.js +26 -0
- package/dist/model/scatter.js +19 -0
- package/dist/model/stacked-horizontal-bar.js +32 -0
- package/dist/model/table.js +23 -0
- package/dist/model/tree-map.js +20 -0
- package/dist/model/trend.js +24 -0
- package/dist/model/user.js +15 -0
- package/dist/model/world-map-bubble.js +26 -0
- package/dist/model/world-map.js +26 -0
- package/{lib/components → dist}/settings/advance-bar-settings/data-settings.js +68 -45
- package/dist/settings/advance-bar-settings/style-settings.js +161 -0
- package/{lib/components → dist}/settings/bar-settings/data-settings.js +76 -51
- package/dist/settings/bar-settings/style-settings.js +179 -0
- package/dist/settings/basic-number-card/data-settings.js +126 -0
- package/dist/settings/basic-number-card/style-settings.js +42 -0
- package/dist/settings/combination-settings/data-settings.js +279 -0
- package/dist/settings/combination-settings/style-settings.js +174 -0
- package/dist/settings/dashboard-settings/data-settings.js +179 -0
- package/{lib/components → dist}/settings/data-settings.js +28 -22
- package/dist/settings/horizontal-bar-settings/data-settings.js +55 -0
- package/dist/settings/horizontal-bar-settings/style-settings.js +46 -0
- package/dist/settings/index.css +85 -0
- package/dist/settings/index.js +76 -0
- package/{lib/components → dist}/settings/pie-settings/data-settings.js +67 -44
- package/{lib/components → dist}/settings/pie-settings/style-settings.js +67 -49
- package/dist/settings/style-settings.js +118 -0
- package/{lib/components → dist}/settings/table-settings/data-settings.js +269 -208
- package/{lib/components → dist}/settings/time-comparison-settings/data-settings.js +82 -67
- package/dist/settings/time-comparison-settings/style-settings.js +213 -0
- package/dist/settings/widgets/basic-summary/index.css +12 -0
- package/dist/settings/widgets/basic-summary/index.js +176 -0
- package/{lib/components/settings/widgets/statistic-type → dist/settings/widgets/chart-type}/index.css +5 -5
- package/dist/settings/widgets/chart-type/index.js +59 -0
- package/{lib/components → dist}/settings/widgets/common-data-settings.js +24 -18
- package/dist/settings/widgets/data-filter/index.css +17 -0
- package/{lib/components → dist}/settings/widgets/data-filter/index.js +51 -37
- package/dist/settings/widgets/data-sort.js +44 -0
- package/dist/settings/widgets/date-summary-item.js +111 -0
- package/dist/settings/widgets/display-values-settings/index.css +13 -0
- package/{lib/components → dist}/settings/widgets/display-values-settings/index.js +19 -14
- package/{lib/components → dist}/settings/widgets/divider/index.css +1 -1
- package/dist/settings/widgets/divider/index.js +12 -0
- package/{lib/components → dist}/settings/widgets/font-settings/font-size-settings.js +14 -12
- package/{lib/components → dist}/settings/widgets/font-settings/font-weight-settings.js +14 -16
- package/dist/settings/widgets/group-by.js +160 -0
- package/{lib/components → dist}/settings/widgets/label-color.js +10 -10
- package/dist/settings/widgets/min-max-setting.js +52 -0
- package/dist/settings/widgets/mininum-slice-percent.js +63 -0
- package/dist/settings/widgets/numeric-summary-item.js +90 -0
- package/dist/settings/widgets/select-table/index.js +38 -0
- package/dist/settings/widgets/stack.js +50 -0
- package/dist/settings/widgets/summary-method-setting.js +66 -0
- package/dist/settings/widgets/summary-settings.js +411 -0
- package/dist/settings/widgets/switch/index.css +37 -0
- package/{lib/components → dist}/settings/widgets/switch/index.js +11 -8
- package/{lib/components → dist}/settings/widgets/text-horizontal-settings.js +12 -10
- package/dist/settings/widgets/time-picker.js +174 -0
- package/{lib/components → dist}/settings/widgets/title-settings/index.js +15 -13
- package/dist/settings/widgets/title-settings/title-text.js +25 -0
- package/dist/settings/widgets/x-axios.js +0 -0
- package/dist/settings/widgets/y-axis-group-settings.js +438 -0
- package/dist/utils/cell-format-utils.js +42 -0
- package/dist/utils/chart-data-sql.js +606 -0
- package/dist/utils/chart-utils.js +1803 -0
- package/dist/utils/chart.js +6 -0
- package/dist/utils/collaborator-manager.js +24 -0
- package/dist/utils/collaborator-utils.js +40 -0
- package/dist/utils/column-2-sql-column.js +551 -0
- package/dist/utils/column-utils.js +208 -0
- package/{lib → dist}/utils/custom-g2.js +11 -11
- package/{lib → dist}/utils/date-translate.js +11 -11
- package/dist/utils/index.js +48 -0
- package/dist/utils/key-generator.js +13 -0
- package/dist/utils/object-utils.js +45 -0
- package/{lib → dist}/utils/options-utils.js +17 -18
- package/dist/view/index.css +53 -0
- package/dist/view/index.js +169 -0
- package/{lib/layout → dist/view}/title/index.css +1 -1
- package/dist/view/title/index.js +46 -0
- package/dist/view/wrapper/area.js +150 -0
- package/dist/view/wrapper/bar-group.js +148 -0
- package/dist/view/wrapper/bar.js +138 -0
- package/dist/view/wrapper/basic-number-card.js +127 -0
- package/dist/view/wrapper/chart-component.js +261 -0
- package/dist/view/wrapper/combination.js +399 -0
- package/dist/view/wrapper/dashboard.js +164 -0
- package/dist/view/wrapper/horizontal-bar-group.js +149 -0
- package/dist/view/wrapper/horizontal-bar.js +140 -0
- package/dist/view/wrapper/horizontal-component.js +78 -0
- package/{lib/components/formatter → dist/view/wrapper}/index.js +90 -71
- package/dist/view/wrapper/line-group.js +145 -0
- package/dist/view/wrapper/line.js +157 -0
- package/dist/view/wrapper/pie.js +185 -0
- package/dist/view/wrapper/ring.js +264 -0
- package/{lib/components/formatter → dist/view/wrapper}/table/index.css +18 -18
- package/dist/view/wrapper/table/index.js +31 -0
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +144 -0
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +198 -0
- package/dist/view/wrapper/table/pivot-table-display-name.js +248 -0
- package/dist/view/wrapper/table/two-dimension-table.js +249 -0
- package/dist/view/wrapper/treemap.js +186 -0
- package/package.json +91 -100
- package/lib/components/formatter/area.js +0 -162
- package/lib/components/formatter/bar-group.js +0 -160
- package/lib/components/formatter/bar.js +0 -150
- package/lib/components/formatter/basic-number-card.js +0 -138
- package/lib/components/formatter/chart-component.js +0 -266
- package/lib/components/formatter/combination.js +0 -407
- package/lib/components/formatter/dashboard.js +0 -182
- package/lib/components/formatter/horizontal-bar-group.js +0 -161
- package/lib/components/formatter/horizontal-bar.js +0 -152
- package/lib/components/formatter/horizontal-component.js +0 -91
- package/lib/components/formatter/line-group.js +0 -157
- package/lib/components/formatter/line.js +0 -170
- package/lib/components/formatter/pie.js +0 -201
- package/lib/components/formatter/ring.js +0 -277
- package/lib/components/formatter/table/index.js +0 -42
- package/lib/components/formatter/table/one-dimension-table-no-numeric-columns.js +0 -145
- package/lib/components/formatter/table/one-dimension-table-with-numeric-columns.js +0 -193
- package/lib/components/formatter/table/pivot-table-display-name.js +0 -249
- package/lib/components/formatter/table/two-dimension-table.js +0 -241
- package/lib/components/formatter/treemap.js +0 -213
- package/lib/components/index.js +0 -5
- package/lib/components/number-input/index.js +0 -31
- package/lib/components/select-group/index.js +0 -63
- package/lib/components/settings/advance-bar-settings/style-settings.js +0 -149
- package/lib/components/settings/bar-settings/style-settings.js +0 -163
- package/lib/components/settings/basic-number-card/data-settings.js +0 -121
- package/lib/components/settings/basic-number-card/style-settings.js +0 -42
- package/lib/components/settings/combination-settings/data-settings.js +0 -256
- package/lib/components/settings/combination-settings/style-settings.js +0 -183
- package/lib/components/settings/dashboard-settings/data-settings.js +0 -167
- package/lib/components/settings/horizontal-bar-settings/data-settings.js +0 -45
- package/lib/components/settings/horizontal-bar-settings/style-settings.js +0 -38
- package/lib/components/settings/index.css +0 -73
- package/lib/components/settings/index.js +0 -74
- package/lib/components/settings/style-settings.js +0 -100
- package/lib/components/settings/time-comparison-settings/style-settings.js +0 -191
- package/lib/components/settings/widgets/basic-summary/index.css +0 -12
- package/lib/components/settings/widgets/basic-summary/index.js +0 -173
- package/lib/components/settings/widgets/data-filter/index.css +0 -17
- package/lib/components/settings/widgets/data-sort.js +0 -38
- package/lib/components/settings/widgets/date-summary-item.js +0 -126
- package/lib/components/settings/widgets/display-values-settings/index.css +0 -13
- package/lib/components/settings/widgets/divider/index.js +0 -10
- package/lib/components/settings/widgets/group-by.js +0 -168
- package/lib/components/settings/widgets/min-max-setting.js +0 -64
- package/lib/components/settings/widgets/mininum-slice-percent.js +0 -72
- package/lib/components/settings/widgets/numeric-summary-item.js +0 -109
- package/lib/components/settings/widgets/select-table/index.js +0 -49
- package/lib/components/settings/widgets/stack.js +0 -58
- package/lib/components/settings/widgets/statistic-type/index.js +0 -54
- package/lib/components/settings/widgets/summary-method-setting.js +0 -80
- package/lib/components/settings/widgets/summary-settings.js +0 -394
- package/lib/components/settings/widgets/switch/index.css +0 -37
- package/lib/components/settings/widgets/time-picker.js +0 -182
- package/lib/components/settings/widgets/title-settings/title-text.js +0 -31
- package/lib/components/settings/widgets/y-axis-group-settings.js +0 -399
- package/lib/components/types-dialog/index.css +0 -97
- package/lib/components/types-dialog/index.js +0 -127
- package/lib/constants/index.js +0 -164
- package/lib/constants/style.js +0 -13
- package/lib/constants/type-image.js +0 -32
- package/lib/constants/type.js +0 -97
- package/lib/context.js +0 -49
- package/lib/index.js +0 -6
- package/lib/intl.js +0 -37
- package/lib/layout/index.js +0 -4
- package/lib/layout/statistic/index.css +0 -53
- package/lib/layout/statistic/index.js +0 -190
- package/lib/layout/title/index.js +0 -41
- package/lib/locale/index.js +0 -11
- package/lib/model/area-group.js +0 -51
- package/lib/model/area.js +0 -42
- package/lib/model/bar-group.js +0 -54
- package/lib/model/bar-stack.js +0 -51
- package/lib/model/bar.js +0 -48
- package/lib/model/base-model.js +0 -11
- package/lib/model/basic-number-card.js +0 -32
- package/lib/model/combination.js +0 -48
- package/lib/model/compare-bar.js +0 -49
- package/lib/model/completeness-group.js +0 -34
- package/lib/model/completeness.js +0 -28
- package/lib/model/dashboard.js +0 -26
- package/lib/model/generic-model.js +0 -235
- package/lib/model/heat-map.js +0 -33
- package/lib/model/horizontal-bar.js +0 -48
- package/lib/model/horizontal-group-bar.js +0 -53
- package/lib/model/index.js +0 -36
- package/lib/model/line-group.js +0 -54
- package/lib/model/line.js +0 -48
- package/lib/model/map-bubble.js +0 -37
- package/lib/model/map.js +0 -37
- package/lib/model/mirror.js +0 -36
- package/lib/model/pie.js +0 -36
- package/lib/model/ring.js +0 -36
- package/lib/model/scatter.js +0 -29
- package/lib/model/stacked-horizontal-bar.js +0 -42
- package/lib/model/statistic.js +0 -22
- package/lib/model/table.js +0 -33
- package/lib/model/tree-map.js +0 -30
- package/lib/model/trend.js +0 -34
- package/lib/model/user.js +0 -22
- package/lib/model/world-map-bubble.js +0 -36
- package/lib/model/world-map.js +0 -36
- package/lib/utils/cell-format-utils.js +0 -41
- package/lib/utils/chart.js +0 -6
- package/lib/utils/collaborator-utils.js +0 -40
- package/lib/utils/column-utils.js +0 -247
- package/lib/utils/data-filter/filter-item-utils.js +0 -80
- package/lib/utils/data-filter/filters-utils.js +0 -406
- package/lib/utils/data-filter/index.js +0 -3
- package/lib/utils/index.js +0 -50
- package/lib/utils/key-generator.js +0 -13
- package/lib/utils/object-utils.js +0 -61
- package/lib/utils/statistic-column-2-sql-column-utils.js +0 -499
- package/lib/utils/statistic-utils.js +0 -1685
- /package/{lib → dist}/assets/icons/area-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/bar-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/card.svg +0 -0
- /package/{lib → dist}/assets/icons/combination-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/dtable-logo.svg +0 -0
- /package/{lib → dist}/assets/icons/facet-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/gauge.svg +0 -0
- /package/{lib → dist}/assets/icons/heat-map.svg +0 -0
- /package/{lib → dist}/assets/icons/histogram.svg +0 -0
- /package/{lib → dist}/assets/icons/line-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/map.svg +0 -0
- /package/{lib → dist}/assets/icons/pie-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/rectangular-tree-diagram.svg +0 -0
- /package/{lib → dist}/assets/icons/scatter-chart.svg +0 -0
- /package/{lib → dist}/assets/icons/type-change.svg +0 -0
- /package/{lib → dist}/assets/img/area-chart.png +0 -0
- /package/{lib → dist}/assets/img/area-group-chart.png +0 -0
- /package/{lib → dist}/assets/img/bar-group.png +0 -0
- /package/{lib → dist}/assets/img/bar-stack.png +0 -0
- /package/{lib → dist}/assets/img/bar.png +0 -0
- /package/{lib → dist}/assets/img/combination-chart.png +0 -0
- /package/{lib → dist}/assets/img/compared-chart.png +0 -0
- /package/{lib → dist}/assets/img/completeness-chart.png +0 -0
- /package/{lib → dist}/assets/img/custom-bar.png +0 -0
- /package/{lib → dist}/assets/img/dashboard-chart.png +0 -0
- /package/{lib → dist}/assets/img/group-completeness-chart.png +0 -0
- /package/{lib → dist}/assets/img/group_line.png +0 -0
- /package/{lib → dist}/assets/img/heat-map.png +0 -0
- /package/{lib → dist}/assets/img/horizontal-bar.png +0 -0
- /package/{lib → dist}/assets/img/horizontal-group-bar.png +0 -0
- /package/{lib → dist}/assets/img/line.png +0 -0
- /package/{lib → dist}/assets/img/map-bubble.png +0 -0
- /package/{lib → dist}/assets/img/map.png +0 -0
- /package/{lib → dist}/assets/img/mirror.png +0 -0
- /package/{lib → dist}/assets/img/number-card.png +0 -0
- /package/{lib → dist}/assets/img/pie.png +0 -0
- /package/{lib → dist}/assets/img/pivot-table.png +0 -0
- /package/{lib → dist}/assets/img/ring.png +0 -0
- /package/{lib → dist}/assets/img/scatter.png +0 -0
- /package/{lib → dist}/assets/img/stacked-horizontal-bar.png +0 -0
- /package/{lib → dist}/assets/img/treemap.png +0 -0
- /package/{lib → dist}/assets/img/trend-chart.png +0 -0
- /package/{lib → dist}/assets/img/world-map-bubble.png +0 -0
- /package/{lib → dist}/assets/img/world-map.png +0 -0
- /package/{lib → dist}/components/loading/index.css +0 -0
- /package/{lib/components/settings/widgets/select-table → dist/editor}/index.css +0 -0
- /package/{lib/components → dist}/settings/advance-bar-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/bar-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/basic-number-card/index.js +0 -0
- /package/{lib/components → dist}/settings/combination-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/dashboard-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/horizontal-bar-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/pie-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/table-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/time-comparison-settings/index.js +0 -0
- /package/{lib/components → dist}/settings/widgets/font-settings/index.js +0 -0
- /package/{lib/components/settings/widgets/x-axios.js → dist/settings/widgets/select-table/index.css} +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import { isNumber } from 'dtable-utils';
|
|
3
|
-
import classnames from 'classnames';
|
|
4
|
-
import { HORIZONTAL_ALIGNS, HORIZONTAL_ALIGN, DEFAULT_STATISTIC_FONT_WEIGHT, DEFAULT_STATISTIC_TITLE_FONT_SIZE, STATISTIC_SUPPORT_FONT_WEIGHTS, SUPPORT_TITLE_CHART_TYPES } from '../../constants';
|
|
5
|
-
import './index.css';
|
|
6
|
-
var Title = function Title(_ref) {
|
|
7
|
-
var statistic = _ref.statistic,
|
|
8
|
-
className = _ref.className;
|
|
9
|
-
var getTitleStyle = useCallback(function () {
|
|
10
|
-
var style = {
|
|
11
|
-
fontSize: "".concat(DEFAULT_STATISTIC_TITLE_FONT_SIZE, "px"),
|
|
12
|
-
fontWeight: DEFAULT_STATISTIC_FONT_WEIGHT
|
|
13
|
-
};
|
|
14
|
-
if (!statistic || !statistic.style_config || !statistic.style_config.title) {
|
|
15
|
-
return style;
|
|
16
|
-
}
|
|
17
|
-
var _statistic$style_conf = statistic.style_config.title,
|
|
18
|
-
font_size = _statistic$style_conf.font_size,
|
|
19
|
-
font_weight = _statistic$style_conf.font_weight,
|
|
20
|
-
horizontal_align = _statistic$style_conf.horizontal_align;
|
|
21
|
-
if (isNumber(font_size)) {
|
|
22
|
-
style.fontSize = font_size < 0 ? 0 : "".concat(font_size, "px");
|
|
23
|
-
}
|
|
24
|
-
if (STATISTIC_SUPPORT_FONT_WEIGHTS.includes(font_weight)) {
|
|
25
|
-
style.fontWeight = font_weight;
|
|
26
|
-
}
|
|
27
|
-
style.textAlign = horizontal_align && HORIZONTAL_ALIGNS.includes(horizontal_align) ? horizontal_align : HORIZONTAL_ALIGN.LEFT;
|
|
28
|
-
return style;
|
|
29
|
-
}, [statistic]);
|
|
30
|
-
if (!statistic) return null;
|
|
31
|
-
var chartType = statistic.config.type;
|
|
32
|
-
var title = statistic.style_config && statistic.style_config.title;
|
|
33
|
-
var text = title && title.text;
|
|
34
|
-
if (!SUPPORT_TITLE_CHART_TYPES.includes(chartType) || !text) return null;
|
|
35
|
-
var style = getTitleStyle();
|
|
36
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
-
className: classnames('seastatistic-title', className),
|
|
38
|
-
style: style
|
|
39
|
-
}, text);
|
|
40
|
-
};
|
|
41
|
-
export default Title;
|
package/lib/locale/index.js
DELETED
package/lib/model/area-group.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { LABEL_COLORS, STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var AreaGroup = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(AreaGroup, _BaseModel);
|
|
11
|
-
var _super = _createSuper(AreaGroup);
|
|
12
|
-
function AreaGroup(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, AreaGroup);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.AREA_GROUP
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
// x-axis
|
|
20
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
21
|
-
_this.x_axis_include_empty_cells = isBoolean(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
22
|
-
_this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
23
|
-
_this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
24
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
26
|
-
|
|
27
|
-
// y-axis
|
|
28
|
-
_this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
29
|
-
_this.y_axis_summary_type = options.y_axis_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
30
|
-
_this.y_axis_summary_method = options.y_axis_summary_method;
|
|
31
|
-
_this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
32
|
-
_this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_value : false;
|
|
33
|
-
_this.y_axis_label_position = options.y_axis_label_position;
|
|
34
|
-
_this.y_axis_auto_range = options.y_axis_auto_range;
|
|
35
|
-
_this.y_axis_min = options.y_axis_min;
|
|
36
|
-
_this.y_axis_max = options.y_axis_max;
|
|
37
|
-
_this.y_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
38
|
-
|
|
39
|
-
// column-group
|
|
40
|
-
_this.column_groupby_column_key = options.column_groupby_column_key;
|
|
41
|
-
_this.column_groupby_date_granularity = options.column_groupby_date_granularity;
|
|
42
|
-
_this.column_groupby_geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
43
|
-
_this.column_groupby_multiple_numeric_column = options.column_groupby_multiple_numeric_column;
|
|
44
|
-
_this.summary_columns = options.summary_columns;
|
|
45
|
-
_this.y_axis_use_stack = options.y_axis_use_stack;
|
|
46
|
-
_this.label_font_size = options.label_font_size;
|
|
47
|
-
return _this;
|
|
48
|
-
}
|
|
49
|
-
return _createClass(AreaGroup);
|
|
50
|
-
}(BaseModel);
|
|
51
|
-
export default AreaGroup;
|
package/lib/model/area.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { LABEL_COLORS, STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var Area = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(Area, _BaseModel);
|
|
11
|
-
var _super = _createSuper(Area);
|
|
12
|
-
function Area(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, Area);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.AREA
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
// x axis
|
|
20
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
21
|
-
_this.x_axis_include_empty_cells = isBoolean(options.x_axis_include_empty_cells) ? options.x_axis_include_empty_cells : false;
|
|
22
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
23
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
24
|
-
|
|
25
|
-
// y axis
|
|
26
|
-
_this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
27
|
-
_this.y_axis_summary_type = options.y_axis_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
28
|
-
_this.y_axis_summary_method = options.y_axis_summary_method;
|
|
29
|
-
_this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
30
|
-
_this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
31
|
-
_this.y_axis_label_position = options.y_axis_label_position;
|
|
32
|
-
_this.y_axis_auto_range = options.y_axis_auto_range;
|
|
33
|
-
_this.y_axis_min = options.y_axis_min;
|
|
34
|
-
_this.y_axis_max = options.y_axis_max;
|
|
35
|
-
_this.y_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
36
|
-
_this.sort_type = options.sort_type;
|
|
37
|
-
_this.label_font_size = options.label_font_size;
|
|
38
|
-
return _this;
|
|
39
|
-
}
|
|
40
|
-
return _createClass(Area);
|
|
41
|
-
}(BaseModel);
|
|
42
|
-
export default Area;
|
package/lib/model/bar-group.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { LABEL_COLORS, STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var BarGroup = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(BarGroup, _BaseModel);
|
|
11
|
-
var _super = _createSuper(BarGroup);
|
|
12
|
-
function BarGroup(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, BarGroup);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.BAR_GROUP
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
// x-axis
|
|
20
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
21
|
-
_this.x_axis_include_empty_cells = options.x_axis_include_empty_cells;
|
|
22
|
-
_this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
23
|
-
_this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
24
|
-
|
|
25
|
-
// x-axis style
|
|
26
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
27
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
28
|
-
|
|
29
|
-
// y-axis
|
|
30
|
-
_this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
31
|
-
_this.y_axis_summary_type = options.y_axis_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
32
|
-
_this.y_axis_summary_method = options.y_axis_summary_method || STATISTIC_SUMMARY_TYPE.SUM;
|
|
33
|
-
|
|
34
|
-
// y axis style
|
|
35
|
-
_this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
36
|
-
_this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
37
|
-
_this.y_axis_label_position = options.y_axis_label_position;
|
|
38
|
-
_this.y_axis_auto_range = options.y_axis_auto_range;
|
|
39
|
-
_this.y_axis_min = options.y_axis_min;
|
|
40
|
-
_this.y_axis_max = options.y_axis_max;
|
|
41
|
-
_this.y_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
42
|
-
|
|
43
|
-
// column group
|
|
44
|
-
_this.column_groupby_column_key = options.column_groupby_column_key;
|
|
45
|
-
_this.column_groupby_date_granularity = options.column_groupby_date_granularity;
|
|
46
|
-
_this.column_groupby_geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
47
|
-
_this.column_groupby_multiple_numeric_column = isBoolean(options.column_groupby_multiple_numeric_column) ? options.column_groupby_multiple_numeric_column : false;
|
|
48
|
-
_this.summary_columns = options.summary_columns;
|
|
49
|
-
_this.label_font_size = options.label_font_size;
|
|
50
|
-
return _this;
|
|
51
|
-
}
|
|
52
|
-
return _createClass(BarGroup);
|
|
53
|
-
}(BaseModel);
|
|
54
|
-
export default BarGroup;
|
package/lib/model/bar-stack.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { LABEL_COLORS, STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var BarStack = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(BarStack, _BaseModel);
|
|
11
|
-
var _super = _createSuper(BarStack);
|
|
12
|
-
function BarStack(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, BarStack);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.BAR_STACK
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
// x axis
|
|
20
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
21
|
-
_this.x_axis_include_empty_cells = options.x_axis_include_empty_cells;
|
|
22
|
-
_this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
23
|
-
_this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
24
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
26
|
-
|
|
27
|
-
// y axis
|
|
28
|
-
_this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
29
|
-
_this.y_axis_summary_type = options.y_axis_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
30
|
-
_this.y_axis_summary_method = options.y_axis_summary_method;
|
|
31
|
-
_this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
32
|
-
_this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
33
|
-
_this.y_axis_label_position = options.y_axis_label_position;
|
|
34
|
-
_this.y_axis_auto_range = options.y_axis_auto_range;
|
|
35
|
-
_this.y_axis_min = options.y_axis_min;
|
|
36
|
-
_this.y_axis_max = options.y_axis_max;
|
|
37
|
-
_this.y_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
38
|
-
|
|
39
|
-
// column-group
|
|
40
|
-
_this.column_groupby_column_key = options.column_groupby_column_key;
|
|
41
|
-
_this.column_groupby_date_granularity = options.column_groupby_date_granularity;
|
|
42
|
-
_this.column_groupby_geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
43
|
-
_this.column_groupby_multiple_numeric_column = options.column_groupby_multiple_numeric_column;
|
|
44
|
-
_this.summary_columns = options.summary_columns;
|
|
45
|
-
_this.y_axis_use_stack = true;
|
|
46
|
-
_this.label_font_size = options.label_font_size;
|
|
47
|
-
return _this;
|
|
48
|
-
}
|
|
49
|
-
return _createClass(BarStack);
|
|
50
|
-
}(BaseModel);
|
|
51
|
-
export default BarStack;
|
package/lib/model/bar.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { LABEL_COLORS, STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var Bar = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(Bar, _BaseModel);
|
|
11
|
-
var _super = _createSuper(Bar);
|
|
12
|
-
function Bar(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, Bar);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.BAR
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
// x-axis
|
|
20
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
21
|
-
_this.x_axis_include_empty_cells = options.x_axis_include_empty_cells;
|
|
22
|
-
_this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
23
|
-
_this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
24
|
-
|
|
25
|
-
// x-axis style
|
|
26
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
27
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
28
|
-
|
|
29
|
-
// y-axis
|
|
30
|
-
_this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
31
|
-
_this.y_axis_summary_type = options.y_axis_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
32
|
-
_this.y_axis_summary_method = options.y_axis_summary_method || STATISTIC_SUMMARY_TYPE.SUM;
|
|
33
|
-
|
|
34
|
-
// y-axis style
|
|
35
|
-
_this.y_axis_show_value = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
36
|
-
_this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
37
|
-
_this.y_axis_label_position = options.y_axis_label_position;
|
|
38
|
-
_this.y_axis_auto_range = options.y_axis_auto_range;
|
|
39
|
-
_this.y_axis_min = options.y_axis_min;
|
|
40
|
-
_this.y_axis_max = options.y_axis_max;
|
|
41
|
-
_this.y_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
42
|
-
_this.sort_type = options.sort_type;
|
|
43
|
-
_this.label_font_size = options.label_font_size;
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
return _createClass(Bar);
|
|
47
|
-
}(BaseModel);
|
|
48
|
-
export default Bar;
|
package/lib/model/base-model.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import { STATISTIC_TYPE } from '../constants';
|
|
4
|
-
var BaseModel = /*#__PURE__*/_createClass(function BaseModel(options) {
|
|
5
|
-
_classCallCheck(this, BaseModel);
|
|
6
|
-
this.type = options.type || STATISTIC_TYPE.BAR;
|
|
7
|
-
this.table_id = options.table_id || null;
|
|
8
|
-
this.filters = options.filters || [];
|
|
9
|
-
this.filter_conjunction = options.filter_conjunction || 'And';
|
|
10
|
-
});
|
|
11
|
-
export { BaseModel as default };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import { isNumericColumn, getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
7
|
-
import BaseModel from './base-model';
|
|
8
|
-
import { STATISTIC_SUMMARY_TYPE, STATISTIC_TYPE } from '../constants';
|
|
9
|
-
var BasicNumberCard = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(BasicNumberCard, _BaseModel);
|
|
11
|
-
var _super = _createSuper(BasicNumberCard);
|
|
12
|
-
function BasicNumberCard(options, tables) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, BasicNumberCard);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.BASIC_NUMBER_CARD
|
|
17
|
-
}));
|
|
18
|
-
_this.name = '';
|
|
19
|
-
_this.numeric_column_key = options.x_axis_column_key;
|
|
20
|
-
if (_this.numeric_column_key && _this.table_id && tables) {
|
|
21
|
-
var table = getTableById(tables, _this.table_id);
|
|
22
|
-
var column = getTableColumnByKey(table, _this.numeric_column_key);
|
|
23
|
-
if (!column || !isNumericColumn(column)) {
|
|
24
|
-
_this.numeric_column_key = null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
_this.summary_method = options.y_axis_summary_method || STATISTIC_SUMMARY_TYPE.ROW_COUNT;
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
return _createClass(BasicNumberCard);
|
|
31
|
-
}(BaseModel);
|
|
32
|
-
export default BasicNumberCard;
|
package/lib/model/combination.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var Combination = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(Combination, _BaseModel);
|
|
11
|
-
var _super = _createSuper(Combination);
|
|
12
|
-
function Combination(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, Combination);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.COMBINATION
|
|
17
|
-
}));
|
|
18
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
19
|
-
_this.x_axis_include_empty_cells = options.x_axis_include_empty_cells;
|
|
20
|
-
_this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
21
|
-
_this.x_axis_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
22
|
-
_this.y_axis_left_summary_type = options.y_axis_left_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
23
|
-
_this.y_axis_right_summary_type = options.y_axis_right_summary_type || STATISTIC_SUMMARY_TYPE.COUNT;
|
|
24
|
-
_this.y_axis_left_summary_method = options.y_axis_left_summary_method || STATISTIC_SUMMARY_TYPE.SUM;
|
|
25
|
-
_this.y_axis_right_summary_method = options.y_axis_right_summary_method || STATISTIC_SUMMARY_TYPE.SUM;
|
|
26
|
-
_this.y_axis_left_summary_column = options.y_axis_left_summary_column;
|
|
27
|
-
_this.y_axis_right_summary_column = options.y_axis_right_summary_column;
|
|
28
|
-
_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;
|
|
29
|
-
_this.y_axis_left_group_by_numeric_columns = options.y_axis_left_group_by_numeric_columns;
|
|
30
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
31
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
32
|
-
_this.show_y_axis_left_label = options.show_y_axis_left_label;
|
|
33
|
-
_this.show_y_axis_right_label = options.show_y_axis_right_label;
|
|
34
|
-
_this.y_axis_left_label_position = options.y_axis_left_label_position;
|
|
35
|
-
_this.y_axis_right_label_position = options.y_axis_right_label_position;
|
|
36
|
-
_this.y_axis_auto_range_left = options.y_axis_auto_range_left;
|
|
37
|
-
_this.y_axis_min_left = options.y_axis_min_left;
|
|
38
|
-
_this.y_axis_max_left = options.y_axis_max_left;
|
|
39
|
-
_this.y_axis_auto_range_right = options.y_axis_auto_range_right;
|
|
40
|
-
_this.y_axis_min_right = options.y_axis_min_right;
|
|
41
|
-
_this.y_axis_max_right = options.y_axis_max_right;
|
|
42
|
-
_this.display_data = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
43
|
-
_this.label_font_size = options.label_font_size;
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
return _createClass(Combination);
|
|
47
|
-
}(BaseModel);
|
|
48
|
-
export default Combination;
|
package/lib/model/compare-bar.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import { isDateColumn, getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
7
|
-
import BaseModel from './base-model';
|
|
8
|
-
import { isBoolean } from '../utils';
|
|
9
|
-
import { STATISTIC_TYPE } from '../constants';
|
|
10
|
-
var CompareBar = /*#__PURE__*/function (_BaseModel) {
|
|
11
|
-
_inherits(CompareBar, _BaseModel);
|
|
12
|
-
var _super = _createSuper(CompareBar);
|
|
13
|
-
function CompareBar(options, tables) {
|
|
14
|
-
var _this;
|
|
15
|
-
_classCallCheck(this, CompareBar);
|
|
16
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
17
|
-
type: STATISTIC_TYPE.COMPARE_BAR
|
|
18
|
-
}));
|
|
19
|
-
_this.x_axis_column_key = options.x_axis_column_key;
|
|
20
|
-
if (_this.x_axis_column_key && _this.table_id && tables) {
|
|
21
|
-
var table = getTableById(tables, _this.table_id);
|
|
22
|
-
var column = getTableColumnByKey(table, _this.x_axis_column_key);
|
|
23
|
-
if (!column || !isDateColumn(column)) {
|
|
24
|
-
_this.x_axis_column_key = null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
_this.x_axis_date_granularity = options.x_axis_date_granularity;
|
|
28
|
-
_this.x_axis_date_range_start = options.x_axis_date_range_start;
|
|
29
|
-
_this.x_axis_date_range_end = options.x_axis_date_range_end;
|
|
30
|
-
_this.x_axis_compared_date_range_start = options.x_axis_compared_date_range_start;
|
|
31
|
-
_this.x_axis_compared_date_range_end = options.x_axis_compared_date_range_end;
|
|
32
|
-
_this.x_axis_show_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
33
|
-
_this.y_axis_show_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
34
|
-
_this.x_axis_label_position = options.x_axis_label_position;
|
|
35
|
-
_this.y_axis_label_position = options.y_axis_label_position;
|
|
36
|
-
_this.y_axis_compare_label_color = options.y_axis_compare_label_color;
|
|
37
|
-
_this.y_axis_compared_label_color = options.y_axis_compared_label_color;
|
|
38
|
-
_this.y_axis_summary_column_key = options.y_axis_summary_column_key;
|
|
39
|
-
_this.y_axis_summary_type = options.y_axis_summary_type;
|
|
40
|
-
_this.y_axis_summary_method = options.y_axis_summary_method;
|
|
41
|
-
_this.display_increase = isBoolean(options.display_increase) ? options.display_increase : false;
|
|
42
|
-
_this.display_increase_percentage = isBoolean(options.display_increase_percentage) ? options.display_increase_percentage : false;
|
|
43
|
-
_this.increase_display_color = options.increase_display_color;
|
|
44
|
-
_this.label_font_size = options.label_font_size;
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
return _createClass(CompareBar);
|
|
48
|
-
}(BaseModel);
|
|
49
|
-
export default CompareBar;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { STATISTIC_TYPE, STATISTIC_SUMMARY_TYPE } from '../constants';
|
|
9
|
-
var CompletenessGroup = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(CompletenessGroup, _BaseModel);
|
|
11
|
-
var _super = _createSuper(CompletenessGroup);
|
|
12
|
-
function CompletenessGroup(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, CompletenessGroup);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.COMPLETENESS_GROUP
|
|
17
|
-
}));
|
|
18
|
-
_this.name_column_key = options.x_axis_column_key;
|
|
19
|
-
_this.target_value_column_key = options.target_value_column_key;
|
|
20
|
-
_this.target_value_column_summary_method = options.target_value_column_summary_method || STATISTIC_SUMMARY_TYPE.ROW_COUNT;
|
|
21
|
-
_this.total_value_column_key = options.total_value_column_key;
|
|
22
|
-
_this.total_value_column_summary_method = options.total_value_column_summary_method || STATISTIC_SUMMARY_TYPE.ROW_COUNT;
|
|
23
|
-
_this.completed_column_key = options.completed_column_key;
|
|
24
|
-
_this.target_column_key = options.target_column_key;
|
|
25
|
-
_this.display_percentage = isBoolean(options.display_percentage) ? options.display_percentage : true;
|
|
26
|
-
_this.group_column_key = options.column_groupby_column_key;
|
|
27
|
-
_this.date_granularity = options.column_groupby_date_granularity;
|
|
28
|
-
_this.geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
29
|
-
_this.label_font_size = options.label_font_size;
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
return _createClass(CompletenessGroup);
|
|
33
|
-
}(BaseModel);
|
|
34
|
-
export default CompletenessGroup;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { isBoolean } from '../utils';
|
|
8
|
-
import { LABEL_COLORS, STATISTIC_TYPE } from '../constants';
|
|
9
|
-
var Completeness = /*#__PURE__*/function (_BaseModel) {
|
|
10
|
-
_inherits(Completeness, _BaseModel);
|
|
11
|
-
var _super = _createSuper(Completeness);
|
|
12
|
-
function Completeness(options) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, Completeness);
|
|
15
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
16
|
-
type: STATISTIC_TYPE.COMPLETENESS
|
|
17
|
-
}));
|
|
18
|
-
_this.name_column_key = options.x_axis_column_key;
|
|
19
|
-
_this.completed_column_key = options.completed_column_key;
|
|
20
|
-
_this.target_column_key = options.target_column_key;
|
|
21
|
-
_this.completed_color = options.completed_color || LABEL_COLORS[0];
|
|
22
|
-
_this.display_percentage = isBoolean(options.display_percentage) ? options.display_percentage : true;
|
|
23
|
-
_this.label_font_size = options.label_font_size;
|
|
24
|
-
return _this;
|
|
25
|
-
}
|
|
26
|
-
return _createClass(Completeness);
|
|
27
|
-
}(BaseModel);
|
|
28
|
-
export default Completeness;
|
package/lib/model/dashboard.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
import BaseModel from './base-model';
|
|
7
|
-
import { STATISTIC_SUMMARY_TYPE, STATISTIC_TYPE } from '../constants';
|
|
8
|
-
var Dashboard = /*#__PURE__*/function (_BaseModel) {
|
|
9
|
-
_inherits(Dashboard, _BaseModel);
|
|
10
|
-
var _super = _createSuper(Dashboard);
|
|
11
|
-
function Dashboard(options) {
|
|
12
|
-
var _this;
|
|
13
|
-
_classCallCheck(this, Dashboard);
|
|
14
|
-
_this = _super.call(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
15
|
-
type: STATISTIC_TYPE.DASHBOARD
|
|
16
|
-
}));
|
|
17
|
-
_this.name = '';
|
|
18
|
-
_this.target_value_column_key = options.target_value_column_key;
|
|
19
|
-
_this.target_value_column_summary_method = options.target_value_column_summary_method || STATISTIC_SUMMARY_TYPE.ROW_COUNT;
|
|
20
|
-
_this.total_value_column_key = options.total_value_column_key;
|
|
21
|
-
_this.total_value_column_summary_method = options.total_value_column_summary_method || STATISTIC_SUMMARY_TYPE.ROW_COUNT;
|
|
22
|
-
return _this;
|
|
23
|
-
}
|
|
24
|
-
return _createClass(Dashboard);
|
|
25
|
-
}(BaseModel);
|
|
26
|
-
export default Dashboard;
|