sea-chart 0.0.1
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 +4 -0
- package/lib/assets/icons/area-chart.svg +10 -0
- package/lib/assets/icons/bar-chart.svg +12 -0
- package/lib/assets/icons/card.svg +22 -0
- package/lib/assets/icons/combination-chart.svg +17 -0
- package/lib/assets/icons/dtable-logo.svg +16 -0
- package/lib/assets/icons/facet-chart.svg +12 -0
- package/lib/assets/icons/gauge.svg +18 -0
- package/lib/assets/icons/heat-map.svg +14 -0
- package/lib/assets/icons/histogram.svg +12 -0
- package/lib/assets/icons/line-chart.svg +12 -0
- package/lib/assets/icons/map.svg +20 -0
- package/lib/assets/icons/pie-chart.svg +11 -0
- package/lib/assets/icons/rectangular-tree-diagram.svg +10 -0
- package/lib/assets/icons/scatter-chart.svg +15 -0
- package/lib/assets/icons/type-change.svg +17 -0
- package/lib/assets/img/area-chart.png +0 -0
- package/lib/assets/img/area-group-chart.png +0 -0
- package/lib/assets/img/bar-group.png +0 -0
- package/lib/assets/img/bar-stack.png +0 -0
- package/lib/assets/img/bar.png +0 -0
- package/lib/assets/img/combination-chart.png +0 -0
- package/lib/assets/img/compared-chart.png +0 -0
- package/lib/assets/img/completeness-chart.png +0 -0
- package/lib/assets/img/custom-bar.png +0 -0
- package/lib/assets/img/dashboard-chart.png +0 -0
- package/lib/assets/img/group-completeness-chart.png +0 -0
- package/lib/assets/img/group_line.png +0 -0
- package/lib/assets/img/heat-map.png +0 -0
- package/lib/assets/img/horizontal-bar.png +0 -0
- package/lib/assets/img/horizontal-group-bar.png +0 -0
- package/lib/assets/img/line.png +0 -0
- package/lib/assets/img/map-bubble.png +0 -0
- package/lib/assets/img/map.png +0 -0
- package/lib/assets/img/mirror.png +0 -0
- package/lib/assets/img/number-card.png +0 -0
- package/lib/assets/img/pie.png +0 -0
- package/lib/assets/img/pivot-table.png +0 -0
- package/lib/assets/img/ring.png +0 -0
- package/lib/assets/img/scatter.png +0 -0
- package/lib/assets/img/stacked-horizontal-bar.png +0 -0
- package/lib/assets/img/treemap.png +0 -0
- package/lib/assets/img/trend-chart.png +0 -0
- package/lib/assets/img/world-map-bubble.png +0 -0
- package/lib/assets/img/world-map.png +0 -0
- package/lib/components/collaborator/index.js +24 -0
- package/lib/components/formatter/area.js +162 -0
- package/lib/components/formatter/bar-group.js +160 -0
- package/lib/components/formatter/bar.js +150 -0
- package/lib/components/formatter/basic-number-card.js +138 -0
- package/lib/components/formatter/chart-component.js +266 -0
- package/lib/components/formatter/combination.js +407 -0
- package/lib/components/formatter/dashboard.js +182 -0
- package/lib/components/formatter/horizontal-bar-group.js +161 -0
- package/lib/components/formatter/horizontal-bar.js +152 -0
- package/lib/components/formatter/horizontal-component.js +91 -0
- package/lib/components/formatter/index.js +181 -0
- package/lib/components/formatter/line-group.js +157 -0
- package/lib/components/formatter/line.js +170 -0
- package/lib/components/formatter/pie.js +201 -0
- package/lib/components/formatter/ring.js +277 -0
- package/lib/components/formatter/table/index.css +103 -0
- package/lib/components/formatter/table/index.js +42 -0
- package/lib/components/formatter/table/one-dimension-table-no-numeric-columns.js +145 -0
- package/lib/components/formatter/table/one-dimension-table-with-numeric-columns.js +193 -0
- package/lib/components/formatter/table/pivot-table-display-name.js +249 -0
- package/lib/components/formatter/table/two-dimension-table.js +241 -0
- package/lib/components/formatter/treemap.js +213 -0
- package/lib/components/icon/index.css +5 -0
- package/lib/components/icon/index.js +22 -0
- package/lib/components/index.js +5 -0
- package/lib/components/loading/index.css +54 -0
- package/lib/components/loading/index.js +10 -0
- package/lib/components/number-input/index.js +31 -0
- package/lib/components/pixel-editor/index.css +29 -0
- package/lib/components/pixel-editor/index.js +42 -0
- package/lib/components/select-group/index.css +67 -0
- package/lib/components/select-group/index.js +63 -0
- package/lib/components/settings/advance-bar-settings/data-settings.js +120 -0
- package/lib/components/settings/advance-bar-settings/index.js +3 -0
- package/lib/components/settings/advance-bar-settings/style-settings.js +149 -0
- package/lib/components/settings/bar-settings/data-settings.js +137 -0
- package/lib/components/settings/bar-settings/index.js +3 -0
- package/lib/components/settings/bar-settings/style-settings.js +163 -0
- package/lib/components/settings/basic-number-card/data-settings.js +121 -0
- package/lib/components/settings/basic-number-card/index.js +3 -0
- package/lib/components/settings/basic-number-card/style-settings.js +42 -0
- package/lib/components/settings/combination-settings/data-settings.js +256 -0
- package/lib/components/settings/combination-settings/index.js +3 -0
- package/lib/components/settings/combination-settings/style-settings.js +183 -0
- package/lib/components/settings/dashboard-settings/data-settings.js +167 -0
- package/lib/components/settings/dashboard-settings/index.js +2 -0
- package/lib/components/settings/data-settings.js +67 -0
- package/lib/components/settings/horizontal-bar-settings/data-settings.js +45 -0
- package/lib/components/settings/horizontal-bar-settings/index.js +3 -0
- package/lib/components/settings/horizontal-bar-settings/style-settings.js +38 -0
- package/lib/components/settings/index.css +73 -0
- package/lib/components/settings/index.js +74 -0
- package/lib/components/settings/pie-settings/data-settings.js +123 -0
- package/lib/components/settings/pie-settings/index.js +3 -0
- package/lib/components/settings/pie-settings/style-settings.js +123 -0
- package/lib/components/settings/style-settings.js +100 -0
- package/lib/components/settings/table-settings/data-settings.js +488 -0
- package/lib/components/settings/table-settings/index.js +2 -0
- package/lib/components/settings/time-comparison-settings/data-settings.js +157 -0
- package/lib/components/settings/time-comparison-settings/index.js +3 -0
- package/lib/components/settings/time-comparison-settings/style-settings.js +191 -0
- package/lib/components/settings/widgets/basic-summary/index.css +12 -0
- package/lib/components/settings/widgets/basic-summary/index.js +173 -0
- package/lib/components/settings/widgets/common-data-settings.js +42 -0
- package/lib/components/settings/widgets/data-filter/index.css +17 -0
- package/lib/components/settings/widgets/data-filter/index.js +76 -0
- package/lib/components/settings/widgets/data-sort.js +38 -0
- package/lib/components/settings/widgets/date-summary-item.js +126 -0
- package/lib/components/settings/widgets/display-values-settings/index.css +13 -0
- package/lib/components/settings/widgets/display-values-settings/index.js +37 -0
- package/lib/components/settings/widgets/divider/index.css +4 -0
- package/lib/components/settings/widgets/divider/index.js +10 -0
- package/lib/components/settings/widgets/font-settings/font-size-settings.js +31 -0
- package/lib/components/settings/widgets/font-settings/font-weight-settings.js +46 -0
- package/lib/components/settings/widgets/font-settings/index.js +3 -0
- package/lib/components/settings/widgets/group-by.js +168 -0
- package/lib/components/settings/widgets/label-color.js +30 -0
- package/lib/components/settings/widgets/min-max-setting.js +64 -0
- package/lib/components/settings/widgets/mininum-slice-percent.js +72 -0
- package/lib/components/settings/widgets/numeric-summary-item.js +109 -0
- package/lib/components/settings/widgets/select-table/index.css +0 -0
- package/lib/components/settings/widgets/select-table/index.js +49 -0
- package/lib/components/settings/widgets/stack.js +58 -0
- package/lib/components/settings/widgets/statistic-type/index.css +31 -0
- package/lib/components/settings/widgets/statistic-type/index.js +54 -0
- package/lib/components/settings/widgets/summary-method-setting.js +80 -0
- package/lib/components/settings/widgets/summary-settings.js +394 -0
- package/lib/components/settings/widgets/switch/index.css +37 -0
- package/lib/components/settings/widgets/switch/index.js +21 -0
- package/lib/components/settings/widgets/text-horizontal-settings.js +23 -0
- package/lib/components/settings/widgets/time-picker.js +182 -0
- package/lib/components/settings/widgets/title-settings/index.js +58 -0
- package/lib/components/settings/widgets/title-settings/title-text.js +31 -0
- package/lib/components/settings/widgets/x-axios.js +0 -0
- package/lib/components/settings/widgets/y-axis-group-settings.js +399 -0
- package/lib/components/types-dialog/index.css +97 -0
- package/lib/components/types-dialog/index.js +127 -0
- package/lib/constants/geolocation.js +11 -0
- package/lib/constants/index.js +164 -0
- package/lib/constants/model.js +167 -0
- package/lib/constants/style.js +13 -0
- package/lib/constants/type-image.js +32 -0
- package/lib/constants/type.js +97 -0
- package/lib/context.js +49 -0
- package/lib/index.js +6 -0
- package/lib/intl.js +37 -0
- package/lib/layout/index.js +4 -0
- package/lib/layout/statistic/index.css +53 -0
- package/lib/layout/statistic/index.js +190 -0
- package/lib/layout/title/index.css +3 -0
- package/lib/layout/title/index.js +41 -0
- package/lib/locale/index.js +11 -0
- package/lib/locale/lang/de.js +141 -0
- package/lib/locale/lang/en.js +143 -0
- package/lib/locale/lang/es.js +141 -0
- package/lib/locale/lang/fr.js +141 -0
- package/lib/locale/lang/pt.js +141 -0
- package/lib/locale/lang/ru.js +141 -0
- package/lib/locale/lang/zh_CN.js +143 -0
- package/lib/model/area-group.js +51 -0
- package/lib/model/area.js +42 -0
- package/lib/model/bar-group.js +54 -0
- package/lib/model/bar-stack.js +51 -0
- package/lib/model/bar.js +48 -0
- package/lib/model/base-model.js +11 -0
- package/lib/model/basic-number-card.js +32 -0
- package/lib/model/combination.js +48 -0
- package/lib/model/compare-bar.js +49 -0
- package/lib/model/completeness-group.js +34 -0
- package/lib/model/completeness.js +28 -0
- package/lib/model/dashboard.js +26 -0
- package/lib/model/generic-model.js +235 -0
- package/lib/model/heat-map.js +33 -0
- package/lib/model/horizontal-bar.js +48 -0
- package/lib/model/horizontal-group-bar.js +53 -0
- package/lib/model/index.js +36 -0
- package/lib/model/line-group.js +54 -0
- package/lib/model/line.js +48 -0
- package/lib/model/map-bubble.js +37 -0
- package/lib/model/map.js +37 -0
- package/lib/model/mirror.js +36 -0
- package/lib/model/pie.js +36 -0
- package/lib/model/ring.js +36 -0
- package/lib/model/scatter.js +29 -0
- package/lib/model/stacked-horizontal-bar.js +42 -0
- package/lib/model/statistic.js +22 -0
- package/lib/model/table.js +33 -0
- package/lib/model/tree-map.js +30 -0
- package/lib/model/trend.js +34 -0
- package/lib/model/user.js +22 -0
- package/lib/model/world-map-bubble.js +36 -0
- package/lib/model/world-map.js +36 -0
- package/lib/utils/cell-format-utils.js +41 -0
- package/lib/utils/chart.js +6 -0
- package/lib/utils/collaborator-utils.js +40 -0
- package/lib/utils/column-utils.js +247 -0
- package/lib/utils/custom-g2.js +612 -0
- package/lib/utils/data-filter/filter-item-utils.js +80 -0
- package/lib/utils/data-filter/filters-utils.js +406 -0
- package/lib/utils/data-filter/index.js +3 -0
- package/lib/utils/date-translate.js +66 -0
- package/lib/utils/index.js +50 -0
- package/lib/utils/key-generator.js +13 -0
- package/lib/utils/object-utils.js +61 -0
- package/lib/utils/options-utils.js +61 -0
- package/lib/utils/statistic-column-2-sql-column-utils.js +499 -0
- package/lib/utils/statistic-utils.js +1685 -0
- package/package.json +160 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var ru = {
|
|
3
|
+
'Empty': 'Empty',
|
|
4
|
+
'Amount': 'Amount',
|
|
5
|
+
'Counting': 'Count',
|
|
6
|
+
'Summarize_a_field': 'Summarize a field',
|
|
7
|
+
'By_day': 'By day',
|
|
8
|
+
'By_week': 'By week',
|
|
9
|
+
'By_month': 'By month',
|
|
10
|
+
'By_quarter': 'By quarter',
|
|
11
|
+
'By_year': 'By year',
|
|
12
|
+
'Sum': 'Sum',
|
|
13
|
+
"Avg": "Average",
|
|
14
|
+
"Mdn": "Median",
|
|
15
|
+
'Max': 'Max',
|
|
16
|
+
'Min': 'Min',
|
|
17
|
+
'Mean': 'Mean',
|
|
18
|
+
'Number_of_distinct_values': 'Number of distinct values',
|
|
19
|
+
'By_province': 'By province',
|
|
20
|
+
'By_city': 'By city',
|
|
21
|
+
'By_district': 'By district',
|
|
22
|
+
'Row_count': 'Row count',
|
|
23
|
+
'Left': 'Left',
|
|
24
|
+
'Right': 'Right',
|
|
25
|
+
'Center': 'Center',
|
|
26
|
+
'Top': 'Top',
|
|
27
|
+
'Bottom': 'Bottom',
|
|
28
|
+
'Others': 'Others',
|
|
29
|
+
'Total': 'Total',
|
|
30
|
+
'There_are_too_many_statistics_entries_to_display': 'here are too many statistics entries to display.',
|
|
31
|
+
'Data_settings': 'Data settings',
|
|
32
|
+
'Style_settings': 'Style settings',
|
|
33
|
+
'Include_empty': 'Include empty',
|
|
34
|
+
'X_axis': 'X axis',
|
|
35
|
+
'Y_axis': 'Y axis',
|
|
36
|
+
'Display_value': 'Display values on data points',
|
|
37
|
+
'Auto_range': 'Auto range',
|
|
38
|
+
'Select_a_column': 'Select a column',
|
|
39
|
+
"Summary_method": 'Summary method',
|
|
40
|
+
'Label': '',
|
|
41
|
+
'Y-axis(left side)': 'Y-axis (left side)',
|
|
42
|
+
'Y-axis(right side)': 'Y-axis (right side)',
|
|
43
|
+
'Display_title': 'Display title',
|
|
44
|
+
'Current_value_field': 'Current value field',
|
|
45
|
+
'Total_value_field': 'Total value field',
|
|
46
|
+
'Group_by': 'Group by',
|
|
47
|
+
'Display_legend': 'Display legend',
|
|
48
|
+
'Display_label': 'Display label',
|
|
49
|
+
'Label_position': 'Label position',
|
|
50
|
+
'Label_format': 'Label format',
|
|
51
|
+
'Label_font_size': 'Label font size',
|
|
52
|
+
"Count_the_number_of_records_in_each_group": "Count the number of records in each group",
|
|
53
|
+
"Compute_the_sum_maximum_or_minimum_value_of_records_in_each_group_by_a_field": "Compute the sum, maximum, minimum or mean value of records in each group by a field",
|
|
54
|
+
"Group_the_records_according_to_the_vertical_axis_and_count_the_records_in_each_group": "Group the records according to the vertical axis, and count the records in each group",
|
|
55
|
+
"Group_the_records_according_to_the_vertical_axis_and_compute_the_sum_maximum_or_minimum_of_records_in_each_group_by_a_field": "Group the records according to the vertical axis, and compute the sum, maximum, minimum or mean of records in each group by a field",
|
|
56
|
+
"Compute_the_sum_maximum_or_minimum_value_of_records_in_each_group_by_multiple_fields": "Compute the sum, maximum, minimum or mean value of records in each group by multiple fields",
|
|
57
|
+
"Count_the_records": "Group the records according to the X axis, and count the records in every group",
|
|
58
|
+
"Compute_sum_max_min": "Group the records according to the X axis, and compute the sum, maximum, minimum or mean by a field in the records",
|
|
59
|
+
'Summarize_multiple_fields': 'Summarize multiple fields',
|
|
60
|
+
'Add_new_field': 'Add new field',
|
|
61
|
+
'Row_grouping_field': 'Row grouping field',
|
|
62
|
+
'Column_grouping_field': 'Column grouping field',
|
|
63
|
+
'Date_range': 'Date range',
|
|
64
|
+
'Compare_to_date_range': 'Compare to date range',
|
|
65
|
+
'Display_increase': 'Display increase',
|
|
66
|
+
'Display_percentage_increase': 'Display percentage increase',
|
|
67
|
+
'Color': 'Color',
|
|
68
|
+
'Data_sort': 'Data sort',
|
|
69
|
+
'Not_sorted': 'Not sorted',
|
|
70
|
+
'Ascending': 'Ascending',
|
|
71
|
+
'Descending': 'Descending',
|
|
72
|
+
'Numeric_field': 'Numeric field',
|
|
73
|
+
'Summary_field': 'Summary field',
|
|
74
|
+
'No_column': 'No column',
|
|
75
|
+
'Display_mode': 'Display mode',
|
|
76
|
+
'Stack': 'Stack',
|
|
77
|
+
'Location_field': 'Location field',
|
|
78
|
+
'Time_field': 'Time field',
|
|
79
|
+
"Calculate_the_number_of_records_in_two_time_periods": "Calculate the number of records in two time periods",
|
|
80
|
+
"Use_a_field_to_calculate_the_sum_maximum_or_minimum_value_of_records_in_two_time_periods": "Use a field to calculate the sum maximum or minimum value of records in two time periods",
|
|
81
|
+
// 'Count_by_var': 'Count_by_var',
|
|
82
|
+
// 'Compute_sum_max_min_by_var': 'Compute_sum_max_min_by_var',
|
|
83
|
+
'No_options': 'No options',
|
|
84
|
+
'Text_horizontal_alignment': 'Text horizontal alignment',
|
|
85
|
+
'Please_input_date': 'Please input date',
|
|
86
|
+
'Filter': 'Filter',
|
|
87
|
+
'1 Filter': '1 filter',
|
|
88
|
+
'Filters': 'filters',
|
|
89
|
+
'Font_size': 'Font size',
|
|
90
|
+
'Table': 'Table',
|
|
91
|
+
'Chart_type': 'Chart type',
|
|
92
|
+
"Histogram": "Histogram",
|
|
93
|
+
"Basic_histogram": "Basic histogram",
|
|
94
|
+
"Grouped_histogram": "Grouped histogram",
|
|
95
|
+
"Stacked_histogram": "Stacked histogram",
|
|
96
|
+
"Time_comparison_histogram": "Time comparison histogram",
|
|
97
|
+
"Bar_chart": "Bar chart",
|
|
98
|
+
"Basic_bar_chart": "Basic bar chart",
|
|
99
|
+
"Grouped_bar_chart": "Grouped bar chart",
|
|
100
|
+
"Stacked_bar_chart": "Stacked bar chart",
|
|
101
|
+
"Completeness": "Completeness chart",
|
|
102
|
+
"Grouped_completeness": "Grouped completeness chart",
|
|
103
|
+
"Line_chart": "Line chart",
|
|
104
|
+
"Basic_line_chart": "Basic line chart",
|
|
105
|
+
"Grouped_line_chart": "Grouped line chart",
|
|
106
|
+
"Area": "Area",
|
|
107
|
+
"Grouped_area": "Grouped area",
|
|
108
|
+
"Pie_chart": "Pie chart",
|
|
109
|
+
"Basic_pie_chart": "Basic pie chart",
|
|
110
|
+
"Ring_chart": "Ring chart",
|
|
111
|
+
"Scatter": "Scatter chart",
|
|
112
|
+
"Combination": "Combination chart",
|
|
113
|
+
"Map": "Map",
|
|
114
|
+
"World_map": "World map",
|
|
115
|
+
"World_map_bubble": "World map(bubble)",
|
|
116
|
+
"Heat_map": "Heat map",
|
|
117
|
+
"Facet_chart": "Facet chart",
|
|
118
|
+
"Mirror_chart": "Mirror chart",
|
|
119
|
+
"Card": "Card",
|
|
120
|
+
"Basic_number_card": "Basic number card",
|
|
121
|
+
"Trend": "Trend chart",
|
|
122
|
+
"Gauge": "Gauge",
|
|
123
|
+
'Tree_map': 'Tree map',
|
|
124
|
+
'Pivot_table': 'Pivot table',
|
|
125
|
+
'Title': 'Title',
|
|
126
|
+
'Edit_type': 'Edit type',
|
|
127
|
+
'Cancel': 'Cancel',
|
|
128
|
+
'Submit': 'Submit',
|
|
129
|
+
'There_are_no_statistic_results_yet': 'There are no statistic results yet',
|
|
130
|
+
'Year': 'Year',
|
|
131
|
+
'Month': 'Month',
|
|
132
|
+
'Day': 'Day',
|
|
133
|
+
'Hour': 'Hour',
|
|
134
|
+
'Minute': 'Minute',
|
|
135
|
+
'Done': 'Done',
|
|
136
|
+
'Internal_server_error': 'Internal server error',
|
|
137
|
+
'Network_error': 'Network error',
|
|
138
|
+
'There_are_some_problems_with_the_filters': 'There are some problems with the filters.',
|
|
139
|
+
'Please_complete_the_chart_configuration_first': 'Please complete the chart configuration first'
|
|
140
|
+
};
|
|
141
|
+
export default ru;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var zh_CN = {
|
|
3
|
+
'Empty': '空',
|
|
4
|
+
'Amount': '数量',
|
|
5
|
+
'Counting': '计数',
|
|
6
|
+
'Summarize_a_field': '归总一个字段',
|
|
7
|
+
"By_day": "按天",
|
|
8
|
+
"By_week": "按周",
|
|
9
|
+
"By_month": "按月",
|
|
10
|
+
"By_quarter": "按季度",
|
|
11
|
+
"By_year": "按年",
|
|
12
|
+
'Sum': '总和',
|
|
13
|
+
"Avg": "平均",
|
|
14
|
+
"Mdn": "中位数",
|
|
15
|
+
'Max': '最大值',
|
|
16
|
+
'Min': '最小值',
|
|
17
|
+
'Mean': '平均值',
|
|
18
|
+
'Number_of_distinct_values': '不同值的数量',
|
|
19
|
+
"By_province": "按省",
|
|
20
|
+
"By_city": "按市",
|
|
21
|
+
"By_district": "按区/县",
|
|
22
|
+
'Row_count': '行数',
|
|
23
|
+
"Left": "左",
|
|
24
|
+
"Center": "中",
|
|
25
|
+
"Right": "右",
|
|
26
|
+
"Bottom": "下",
|
|
27
|
+
"Top": "上",
|
|
28
|
+
'Others': '其他',
|
|
29
|
+
'Total': '总计',
|
|
30
|
+
'There_are_too_many_statistics_entries_to_display': '统计结果条目太多,无法显示。请设置正确的统计选项。',
|
|
31
|
+
'Data_settings': '数据设置',
|
|
32
|
+
'Style_settings': '样式设置',
|
|
33
|
+
'Include_empty': '包含空单元格',
|
|
34
|
+
'X_axis': 'X轴',
|
|
35
|
+
'Y_axis': 'Y轴',
|
|
36
|
+
'Display_value': '显示数据点上的值',
|
|
37
|
+
'Auto_range': '自动设置范围',
|
|
38
|
+
'Select_a_column': '选择一个列',
|
|
39
|
+
"Summary_method": '归总方法',
|
|
40
|
+
'Label': '标签',
|
|
41
|
+
"Y-axis(left side)": "Y 轴(左边)",
|
|
42
|
+
"Y-axis(right side)": "Y 轴(右边)",
|
|
43
|
+
'Display_title': '显示标题',
|
|
44
|
+
"Current_value_field": "当前值字段",
|
|
45
|
+
"Total_value_field": "总值字段",
|
|
46
|
+
"Group_by": "分组依据",
|
|
47
|
+
"Display_legend": "显示图例",
|
|
48
|
+
'Display_label': '显示标签',
|
|
49
|
+
"Label_position": "标签位置",
|
|
50
|
+
"Label_format": "标签格式",
|
|
51
|
+
'Label_font_size': '标签字体大小',
|
|
52
|
+
"Count_the_number_of_records_in_each_group": "计算每个分组中记录的数量",
|
|
53
|
+
"Compute_the_sum_maximum_or_minimum_value_of_records_in_each_group_by_a_field": "按照一个字段计算每个分组中记录的总和、最大值、最小值或者平均值",
|
|
54
|
+
"Group_the_records_according_to_the_vertical_axis_and_count_the_records_in_each_group": "根据纵轴给记录分组,然后计算每组中的记录的数量",
|
|
55
|
+
"Group_the_records_according_to_the_vertical_axis_and_compute_the_sum_maximum_or_minimum_of_records_in_each_group_by_a_field": "根据纵轴给记录分组,然后按照记录的一个字段计算总和、最大值、最小值或者平均值",
|
|
56
|
+
"Compute_the_sum_maximum_or_minimum_value_of_records_in_each_group_by_multiple_fields": "按照多个字段计算分组中记录的总和、最大值、最小值或者平均值",
|
|
57
|
+
"Count_the_records": "根据 X 轴给记录分组,然后计算每组中的记录的数量。",
|
|
58
|
+
"Compute_sum_max_min": "根据 X 轴给记录分组,然后按照记录的某个字段计算总和、最大值、最小值或者平均值",
|
|
59
|
+
"Summarize_multiple_fields": "归总多个字段",
|
|
60
|
+
"Add_new_field": "添加新的字段",
|
|
61
|
+
"Row_grouping_field": "行分组字段",
|
|
62
|
+
"Column_grouping_field": "列分组字段",
|
|
63
|
+
"Date_range": "日期范围",
|
|
64
|
+
"Compare_to_date_range": "对比日期范围",
|
|
65
|
+
"Display_increase": "显示增幅",
|
|
66
|
+
"Display_percentage_increase": "显示百分比增幅",
|
|
67
|
+
"Color": "颜色",
|
|
68
|
+
"Data_sort": "数据排序",
|
|
69
|
+
"Not_sorted": "不排序",
|
|
70
|
+
"Ascending": "升序",
|
|
71
|
+
"Descending": "降序",
|
|
72
|
+
"Numeric_field": "数值字段",
|
|
73
|
+
"Summary_field": "归总字段",
|
|
74
|
+
"Summary_type": "归总类型",
|
|
75
|
+
"No_column": "没有列",
|
|
76
|
+
"Display_mode": "展示方式",
|
|
77
|
+
"Stack": "堆叠",
|
|
78
|
+
"Location_field": "位置字段",
|
|
79
|
+
"Time_field": "时间字段",
|
|
80
|
+
"Calculate_the_number_of_records_in_two_time_periods": "计算两个时间段的记录数",
|
|
81
|
+
"Use_a_field_to_calculate_the_sum_maximum_or_minimum_value_of_records_in_two_time_periods": "使用字段计算两个时间段内记录的最大值或最小值之和",
|
|
82
|
+
// 'Count_by_var': 'Count_by_var',
|
|
83
|
+
// 'Compute_sum_max_min_by_var': 'Compute_sum_max_min_by_var',
|
|
84
|
+
"No_options": "没有选项",
|
|
85
|
+
"Text_horizontal_alignment": "文本水平对齐",
|
|
86
|
+
"Please_input_date": "请输入日期",
|
|
87
|
+
"Filter": "过滤",
|
|
88
|
+
"1 Filter": "1 个过滤条件",
|
|
89
|
+
"Filters": "个过滤条件",
|
|
90
|
+
"Font_size": "字体大小",
|
|
91
|
+
"Font_weight": "字体粗细",
|
|
92
|
+
'Table': '子表',
|
|
93
|
+
'Chart_type': '图表类型',
|
|
94
|
+
"Histogram": "柱状图",
|
|
95
|
+
"Basic_histogram": "基础柱状图",
|
|
96
|
+
"Grouped_histogram": "分组柱状图",
|
|
97
|
+
"Stacked_histogram": "堆叠柱状图",
|
|
98
|
+
"Time_comparison_histogram": "时间对比图",
|
|
99
|
+
"Bar_chart": "条形图",
|
|
100
|
+
"Basic_bar_chart": "基础条形图",
|
|
101
|
+
"Grouped_bar_chart": "分组条形图",
|
|
102
|
+
"Stacked_bar_chart": "堆叠条形图",
|
|
103
|
+
"Completeness": "完成度图",
|
|
104
|
+
"Grouped_completeness": "分组完成度图",
|
|
105
|
+
"Line_chart": "折线图",
|
|
106
|
+
"Basic_line_chart": "基础折线图",
|
|
107
|
+
"Grouped_line_chart": "分组折线图",
|
|
108
|
+
"Area": "面积图",
|
|
109
|
+
"Grouped_area": "分组面积图",
|
|
110
|
+
"Pie_chart": "饼图",
|
|
111
|
+
"Basic_pie_chart": "基础饼图",
|
|
112
|
+
"Ring_chart": "环图",
|
|
113
|
+
"Scatter": "散点图",
|
|
114
|
+
"Combination": "组合图",
|
|
115
|
+
"Map": "地图",
|
|
116
|
+
"World_map": "世界地图",
|
|
117
|
+
"World_map_bubble": "世界地图(气泡图)",
|
|
118
|
+
"Heat_map": "热力图",
|
|
119
|
+
"Facet_chart": "分面图",
|
|
120
|
+
"Mirror_chart": "镜面图",
|
|
121
|
+
"Card": "卡片",
|
|
122
|
+
"Basic_number_card": "基础数字卡片",
|
|
123
|
+
"Trend": "趋势图",
|
|
124
|
+
"Gauge": "仪表盘",
|
|
125
|
+
"Tree_map": "矩形树图",
|
|
126
|
+
"Pivot_table": "表格",
|
|
127
|
+
"Title": "标题",
|
|
128
|
+
"Edit_type": "编辑类型",
|
|
129
|
+
'Cancel': '取消',
|
|
130
|
+
'Submit': '提交',
|
|
131
|
+
"There_are_no_statistic_results_yet": "目前还没有统计结果",
|
|
132
|
+
"Year": "年",
|
|
133
|
+
"Month": "月",
|
|
134
|
+
"Day": "日",
|
|
135
|
+
"Hour": "时",
|
|
136
|
+
"Minute": "分",
|
|
137
|
+
"Done": "完成",
|
|
138
|
+
"Network_error": "网络错误",
|
|
139
|
+
"Internal_server_error": "服务端错误",
|
|
140
|
+
"Please_complete_the_chart_configuration_first": "请先完成图表配置",
|
|
141
|
+
"There_are_some_problems_with_the_filters": "过滤器有一些问题。"
|
|
142
|
+
};
|
|
143
|
+
export default zh_CN;
|
|
@@ -0,0 +1,51 @@
|
|
|
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;
|
|
@@ -0,0 +1,42 @@
|
|
|
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;
|
|
@@ -0,0 +1,54 @@
|
|
|
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;
|
|
@@ -0,0 +1,51 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 };
|
|
@@ -0,0 +1,32 @@
|
|
|
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;
|
|
@@ -0,0 +1,48 @@
|
|
|
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;
|