@qrvey/utils 1.16.0-2 → 1.16.0-21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache-managers/cache-model-manager.js +6 -1
- package/dist/charts/adapters/RequestAdapterMetric.d.ts +2 -1
- package/dist/charts/adapters/RequestAdapterMetric.js +22 -5
- package/dist/charts/adapters/convertChartObjectFromV2toV1.d.ts +2 -0
- package/dist/charts/adapters/convertChartObjectFromV2toV1.js +63 -0
- package/dist/charts/adapters/getPanelBodyByChart.d.ts +2 -0
- package/dist/charts/adapters/getPanelBodyByChart.js +289 -0
- package/dist/charts/adapters/index.d.ts +2 -0
- package/dist/charts/adapters/index.js +2 -0
- package/dist/charts/constants/AGGREGATE.d.ts +3 -1
- package/dist/charts/constants/AGGREGATE.js +2 -0
- package/dist/charts/constants/AGGREGATE_ABBREVIATION.d.ts +3 -1
- package/dist/charts/constants/AGGREGATE_ABBREVIATION.js +2 -0
- package/dist/charts/constants/AGGREGATE_INFO.js +16 -0
- package/dist/charts/constants/AGGREGATE_LABEL.d.ts +3 -1
- package/dist/charts/constants/AGGREGATE_LABEL.js +2 -0
- package/dist/charts/constants/CHART_OBJECT.d.ts +564 -0
- package/dist/charts/constants/CHART_OBJECT.js +53 -0
- package/dist/charts/constants/QUESTION_TYPES.d.ts +241 -0
- package/dist/charts/constants/QUESTION_TYPES.js +410 -0
- package/dist/charts/constants/TIME_PERIOD.d.ts +10 -0
- package/dist/charts/constants/TIME_PERIOD.js +25 -0
- package/dist/charts/constants/index.d.ts +3 -0
- package/dist/charts/constants/index.js +3 -0
- package/dist/charts/helpers/chartTypes.d.ts +24 -0
- package/dist/charts/helpers/chartTypes.js +118 -0
- package/dist/charts/helpers/defaultColumnBuilder.d.ts +56 -0
- package/dist/charts/helpers/defaultColumnBuilder.js +322 -0
- package/dist/charts/helpers/getChartDimensions.d.ts +2 -0
- package/dist/charts/helpers/getChartDimensions.js +263 -0
- package/dist/charts/helpers/index.d.ts +4 -0
- package/dist/charts/helpers/index.js +4 -0
- package/dist/charts/helpers/styleSettingsByChartType.d.ts +60 -0
- package/dist/charts/helpers/styleSettingsByChartType.js +532 -0
- package/dist/charts/interfaces/IChartV2.d.ts +537 -0
- package/dist/charts/interfaces/IChartV2.js +33 -0
- package/dist/charts/interfaces/IRequestAdapterMetric.d.ts +5 -2
- package/dist/charts/interfaces/index.d.ts +1 -0
- package/dist/charts/interfaces/index.js +1 -0
- package/dist/cjs/cache-managers/cache-model-manager.js +6 -1
- package/dist/cjs/charts/adapters/RequestAdapterMetric.d.ts +2 -1
- package/dist/cjs/charts/adapters/RequestAdapterMetric.js +24 -6
- package/dist/cjs/charts/adapters/convertChartObjectFromV2toV1.d.ts +2 -0
- package/dist/cjs/charts/adapters/convertChartObjectFromV2toV1.js +67 -0
- package/dist/cjs/charts/adapters/getPanelBodyByChart.d.ts +2 -0
- package/dist/cjs/charts/adapters/getPanelBodyByChart.js +294 -0
- package/dist/cjs/charts/adapters/index.d.ts +2 -0
- package/dist/cjs/charts/adapters/index.js +2 -0
- package/dist/cjs/charts/constants/AGGREGATE.d.ts +3 -1
- package/dist/cjs/charts/constants/AGGREGATE.js +2 -0
- package/dist/cjs/charts/constants/AGGREGATE_ABBREVIATION.d.ts +3 -1
- package/dist/cjs/charts/constants/AGGREGATE_ABBREVIATION.js +2 -0
- package/dist/cjs/charts/constants/AGGREGATE_INFO.js +16 -0
- package/dist/cjs/charts/constants/AGGREGATE_LABEL.d.ts +3 -1
- package/dist/cjs/charts/constants/AGGREGATE_LABEL.js +2 -0
- package/dist/cjs/charts/constants/CHART_OBJECT.d.ts +564 -0
- package/dist/cjs/charts/constants/CHART_OBJECT.js +56 -0
- package/dist/cjs/charts/constants/QUESTION_TYPES.d.ts +241 -0
- package/dist/cjs/charts/constants/QUESTION_TYPES.js +413 -0
- package/dist/cjs/charts/constants/TIME_PERIOD.d.ts +10 -0
- package/dist/cjs/charts/constants/TIME_PERIOD.js +28 -0
- package/dist/cjs/charts/constants/index.d.ts +3 -0
- package/dist/cjs/charts/constants/index.js +3 -0
- package/dist/cjs/charts/helpers/chartTypes.d.ts +24 -0
- package/dist/cjs/charts/helpers/chartTypes.js +138 -0
- package/dist/cjs/charts/helpers/defaultColumnBuilder.d.ts +56 -0
- package/dist/cjs/charts/helpers/defaultColumnBuilder.js +326 -0
- package/dist/cjs/charts/helpers/getChartDimensions.d.ts +2 -0
- package/dist/cjs/charts/helpers/getChartDimensions.js +267 -0
- package/dist/cjs/charts/helpers/index.d.ts +4 -0
- package/dist/cjs/charts/helpers/index.js +4 -0
- package/dist/cjs/charts/helpers/styleSettingsByChartType.d.ts +60 -0
- package/dist/cjs/charts/helpers/styleSettingsByChartType.js +541 -0
- package/dist/cjs/charts/interfaces/IChartV2.d.ts +537 -0
- package/dist/cjs/charts/interfaces/IChartV2.js +36 -0
- package/dist/cjs/charts/interfaces/IRequestAdapterMetric.d.ts +5 -2
- package/dist/cjs/charts/interfaces/index.d.ts +1 -0
- package/dist/cjs/charts/interfaces/index.js +1 -0
- package/dist/cjs/column_format/helpers/columnTypeByChart.js +3 -1
- package/dist/cjs/columns/interfaces/IColumn.d.ts +1 -0
- package/dist/cjs/columns/interfaces/IColunmCalculation.d.ts +5 -0
- package/dist/cjs/constants/Charts.Const.d.ts +2 -1
- package/dist/cjs/constants/Charts.Const.js +1 -0
- package/dist/cjs/elements/helpers/fixed.d.ts +12 -1
- package/dist/cjs/elements/helpers/fixed.js +33 -8
- package/dist/cjs/elements/helpers/gridStrategy.d.ts +13 -0
- package/dist/cjs/elements/helpers/gridStrategy.js +31 -3
- package/dist/cjs/elements/helpers/responsive.d.ts +11 -1
- package/dist/cjs/elements/helpers/responsive.js +31 -1
- package/dist/cjs/elements/utils/fixed.position.d.ts +1 -0
- package/dist/cjs/elements/utils/fixed.position.js +8 -1
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.js +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPES.js +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +29 -6
- package/dist/cjs/filters/helpers/common/excludeFiltersByDatasetsColumns.d.ts +10 -0
- package/dist/cjs/filters/helpers/common/excludeFiltersByDatasetsColumns.js +64 -0
- package/dist/cjs/filters/helpers/common/index.d.ts +1 -0
- package/dist/cjs/filters/helpers/common/index.js +1 -0
- package/dist/cjs/format/duration/durationFormatter.js +4 -1
- package/dist/cjs/formulas/constants/FORMULA.d.ts +1 -0
- package/dist/cjs/formulas/constants/FORMULA.js +2 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderGeneralOptions.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMessagesDefault.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMessagesGeneral.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardAddChart.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderCreateModal.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +7 -7
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +4 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +4 -0
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +1 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +16 -14
- package/dist/column_format/helpers/columnTypeByChart.js +4 -2
- package/dist/columns/interfaces/IColumn.d.ts +1 -0
- package/dist/columns/interfaces/IColunmCalculation.d.ts +5 -0
- package/dist/constants/Charts.Const.d.ts +2 -1
- package/dist/constants/Charts.Const.js +1 -0
- package/dist/elements/helpers/fixed.d.ts +12 -1
- package/dist/elements/helpers/fixed.js +30 -6
- package/dist/elements/helpers/gridStrategy.d.ts +13 -0
- package/dist/elements/helpers/gridStrategy.js +31 -4
- package/dist/elements/helpers/responsive.d.ts +11 -1
- package/dist/elements/helpers/responsive.js +29 -0
- package/dist/elements/utils/fixed.position.d.ts +1 -0
- package/dist/elements/utils/fixed.position.js +6 -0
- package/dist/filters/constants/common/FILTER_SCOPE.d.ts +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE.js +1 -0
- package/dist/filters/constants/common/FILTER_SCOPES.js +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
- package/dist/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +29 -6
- package/dist/filters/helpers/common/excludeFiltersByDatasetsColumns.d.ts +10 -0
- package/dist/filters/helpers/common/excludeFiltersByDatasetsColumns.js +60 -0
- package/dist/filters/helpers/common/index.d.ts +1 -0
- package/dist/filters/helpers/common/index.js +1 -0
- package/dist/format/duration/durationFormatter.js +4 -1
- package/dist/formulas/constants/FORMULA.d.ts +1 -0
- package/dist/formulas/constants/FORMULA.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderGeneralOptions.d.ts +4 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMessagesDefault.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMessagesGeneral.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +4 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardAddChart.d.ts +1 -0
- package/dist/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
- package/dist/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderCreateModal.d.ts +2 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +7 -7
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +4 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +4 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +1 -0
- package/dist/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +16 -14
- package/package.json +3 -3
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
import { CHART_DIMENSION, CHART_TYPE } from "../../constants";
|
|
2
|
+
import { _get, capitalize, omit } from "../../general";
|
|
3
|
+
import { hasDimension } from "./chartTypes";
|
|
4
|
+
export const parseStyleSettingByType = (type, { stylesSettings, globalSettings, isGrouped }, optsCombo) => {
|
|
5
|
+
var _a, _b, _c, _d;
|
|
6
|
+
const { theme, color, thickness, line_style: style, line_type: straight, y_axis, data_labels, symbol_type: symbol, symbol_fill: fill, opacity, } = stylesSettings;
|
|
7
|
+
const y_axis_format = _get(y_axis, "format.value") === "General"
|
|
8
|
+
? "Default"
|
|
9
|
+
: _get(y_axis, "format.value");
|
|
10
|
+
const pie_labels = _get(data_labels, "pie_labels.format.value") === "General"
|
|
11
|
+
? "Default"
|
|
12
|
+
: _get(data_labels, "pie_labels.format.value");
|
|
13
|
+
const heat_map_labels = _get(data_labels, "heat_map_labels.format.value") === "General"
|
|
14
|
+
? "Default"
|
|
15
|
+
: _get(data_labels, "heat_map_labels.format.value");
|
|
16
|
+
const format = {
|
|
17
|
+
y_axis: y_axis_format,
|
|
18
|
+
data_labels: type === CHART_TYPE.PIE_CHART ? pie_labels : heat_map_labels,
|
|
19
|
+
};
|
|
20
|
+
return ({
|
|
21
|
+
[CHART_TYPE.BAR_CHART]: {
|
|
22
|
+
color,
|
|
23
|
+
theme,
|
|
24
|
+
orientation: stylesSettings.orientation,
|
|
25
|
+
format,
|
|
26
|
+
},
|
|
27
|
+
[CHART_TYPE.BAR_CHART_MS]: {
|
|
28
|
+
color,
|
|
29
|
+
theme,
|
|
30
|
+
orientation: "VERTICAL",
|
|
31
|
+
format,
|
|
32
|
+
},
|
|
33
|
+
[CHART_TYPE.SYMBOL_CHART]: {
|
|
34
|
+
color,
|
|
35
|
+
theme,
|
|
36
|
+
fill,
|
|
37
|
+
symbol,
|
|
38
|
+
format,
|
|
39
|
+
},
|
|
40
|
+
[CHART_TYPE.SYMBOL_CHART_MS]: {
|
|
41
|
+
color,
|
|
42
|
+
theme,
|
|
43
|
+
format,
|
|
44
|
+
fill,
|
|
45
|
+
symbol,
|
|
46
|
+
},
|
|
47
|
+
[CHART_TYPE.LINE_CHART]: {
|
|
48
|
+
color,
|
|
49
|
+
theme,
|
|
50
|
+
thickness,
|
|
51
|
+
straight,
|
|
52
|
+
style,
|
|
53
|
+
format,
|
|
54
|
+
},
|
|
55
|
+
[CHART_TYPE.LINE_CHART_MS]: {
|
|
56
|
+
color,
|
|
57
|
+
theme,
|
|
58
|
+
thickness,
|
|
59
|
+
straight,
|
|
60
|
+
style,
|
|
61
|
+
format,
|
|
62
|
+
},
|
|
63
|
+
[CHART_TYPE.AREA_CHART]: {
|
|
64
|
+
color,
|
|
65
|
+
straight,
|
|
66
|
+
style,
|
|
67
|
+
format,
|
|
68
|
+
orientation: stylesSettings.orientation,
|
|
69
|
+
},
|
|
70
|
+
[CHART_TYPE.SCATTER_CHART]: {
|
|
71
|
+
color,
|
|
72
|
+
straight,
|
|
73
|
+
style,
|
|
74
|
+
format,
|
|
75
|
+
orientation: stylesSettings.orientation,
|
|
76
|
+
},
|
|
77
|
+
[CHART_TYPE.AREA_CHART_MS]: {
|
|
78
|
+
color,
|
|
79
|
+
straight,
|
|
80
|
+
style,
|
|
81
|
+
format,
|
|
82
|
+
orientation: stylesSettings.orientation,
|
|
83
|
+
},
|
|
84
|
+
[CHART_TYPE.RADAR_CHART]: {
|
|
85
|
+
color,
|
|
86
|
+
theme,
|
|
87
|
+
thickness,
|
|
88
|
+
straight,
|
|
89
|
+
style,
|
|
90
|
+
format,
|
|
91
|
+
},
|
|
92
|
+
[CHART_TYPE.COMBO_CHART]: {
|
|
93
|
+
custom_color: optsCombo.custom_color,
|
|
94
|
+
custom_theme: optsCombo.custom_theme,
|
|
95
|
+
match_colors: optsCombo.match_colors,
|
|
96
|
+
color_type: optsCombo.color_type,
|
|
97
|
+
color: [optsCombo.color],
|
|
98
|
+
theme: optsCombo.theme,
|
|
99
|
+
thickness: optsCombo.thickness,
|
|
100
|
+
straight: optsCombo.line_type,
|
|
101
|
+
style: optsCombo.line_style,
|
|
102
|
+
format: Object.assign(Object.assign({}, format), { y_axis: optsCombo.format || _get(optsCombo, "y_axis.format.value") }),
|
|
103
|
+
symbol: optsCombo.symbol_type,
|
|
104
|
+
fill: optsCombo.symbol_fill,
|
|
105
|
+
axis_scale: _get(optsCombo, "y_axis.scale"),
|
|
106
|
+
},
|
|
107
|
+
[CHART_TYPE.HEATMAP_CHART]: {
|
|
108
|
+
orientation: "VERTICAL",
|
|
109
|
+
format,
|
|
110
|
+
},
|
|
111
|
+
[CHART_TYPE.WORD_CLOUD]: {},
|
|
112
|
+
[CHART_TYPE.PIE_CHART]: {
|
|
113
|
+
color,
|
|
114
|
+
theme,
|
|
115
|
+
format,
|
|
116
|
+
pielabel: ((_a = stylesSettings.data_labels) === null || _a === void 0 ? void 0 : _a.pie_labels)
|
|
117
|
+
? (_b = stylesSettings.data_labels.pie_labels) === null || _b === void 0 ? void 0 : _b.position
|
|
118
|
+
: "outside",
|
|
119
|
+
donut: stylesSettings.pie_type === "donut",
|
|
120
|
+
data_labels: (_c = stylesSettings.data_labels) === null || _c === void 0 ? void 0 : _c.value,
|
|
121
|
+
percent_labels: stylesSettings.percent_labels,
|
|
122
|
+
visible_labels: (_d = stylesSettings.data_labels) === null || _d === void 0 ? void 0 : _d.visible,
|
|
123
|
+
},
|
|
124
|
+
[CHART_TYPE.MINMAX_CHART]: {
|
|
125
|
+
color,
|
|
126
|
+
theme,
|
|
127
|
+
symbol,
|
|
128
|
+
fill,
|
|
129
|
+
thickness,
|
|
130
|
+
straight,
|
|
131
|
+
style,
|
|
132
|
+
orientation: stylesSettings.orientation,
|
|
133
|
+
format,
|
|
134
|
+
opacity,
|
|
135
|
+
},
|
|
136
|
+
[CHART_TYPE.REFERENCE]: {
|
|
137
|
+
color,
|
|
138
|
+
theme,
|
|
139
|
+
fill: "None",
|
|
140
|
+
thickness,
|
|
141
|
+
style: "Solid",
|
|
142
|
+
opacity: 20,
|
|
143
|
+
},
|
|
144
|
+
[CHART_TYPE.TREND]: {
|
|
145
|
+
color,
|
|
146
|
+
theme,
|
|
147
|
+
style: "Solid",
|
|
148
|
+
thickness,
|
|
149
|
+
},
|
|
150
|
+
[CHART_TYPE.SMALL_MULTIPLES]: {
|
|
151
|
+
maxMultiplePanels: 4,
|
|
152
|
+
displayMultiplePanels: false,
|
|
153
|
+
displayBorder: false,
|
|
154
|
+
labels: { axis: true },
|
|
155
|
+
},
|
|
156
|
+
[CHART_TYPE.BOXWHISKER_CHART]: {
|
|
157
|
+
thickness,
|
|
158
|
+
opacity: (100 - parseInt(opacity, 10)) / 10,
|
|
159
|
+
displaySymbol: _get(stylesSettings, "outliers.value"),
|
|
160
|
+
symbol: _get(stylesSettings, "outliers.symbol_type"),
|
|
161
|
+
fill: _get(stylesSettings, "outliers.symbol_fill"),
|
|
162
|
+
orientation: stylesSettings.orientation,
|
|
163
|
+
},
|
|
164
|
+
[CHART_TYPE.GEO_CHART]: {
|
|
165
|
+
baseMap: {
|
|
166
|
+
text: "Streets",
|
|
167
|
+
label: "mapbox://styles/mapbox/streets-v11",
|
|
168
|
+
},
|
|
169
|
+
symbol: "circle",
|
|
170
|
+
opacity: 5,
|
|
171
|
+
mapborder: true,
|
|
172
|
+
mapRegion: { text: "Default", label: "DEFAULT" },
|
|
173
|
+
},
|
|
174
|
+
[CHART_TYPE.GEO_CHART_BUBBLE]: Object.assign({}, parseMaps(stylesSettings)),
|
|
175
|
+
[CHART_TYPE.GEO_CHART_DOT]: Object.assign(Object.assign({}, parseMaps(stylesSettings)), { symbol, symbolfill: fill === "Filled" }),
|
|
176
|
+
[CHART_TYPE.GEO_CHART_CHOROPLETH]: Object.assign({}, parseMaps(stylesSettings)),
|
|
177
|
+
[CHART_TYPE.CROSSTAB_CHART]: {
|
|
178
|
+
format: _get(stylesSettings, "format.value"),
|
|
179
|
+
groupedTotals: {
|
|
180
|
+
label: _get(globalSettings, "crosstab_totals.value", false)
|
|
181
|
+
? _get(globalSettings, "crosstab_totals.option", "SHOW")
|
|
182
|
+
: "DONTSHOW",
|
|
183
|
+
},
|
|
184
|
+
groupedSubtotals: {
|
|
185
|
+
label: _get(globalSettings, "crosstab_subtotals", false)
|
|
186
|
+
? "SHOW"
|
|
187
|
+
: "DONTSHOW",
|
|
188
|
+
},
|
|
189
|
+
rowsMaxDataPoints: _get(globalSettings, "max_rows.value", true),
|
|
190
|
+
columnsMaxDataPoints: _get(globalSettings, "max_groups.value", true),
|
|
191
|
+
maxRowNumDataPoints: _get(globalSettings, "max_rows.option", true),
|
|
192
|
+
maxColumnsNumDataPoints: _get(globalSettings, "max_groups.option", true),
|
|
193
|
+
},
|
|
194
|
+
[CHART_TYPE.TABLE_CHART]: {
|
|
195
|
+
sorting: _get(globalSettings, "table_menu.sorting"),
|
|
196
|
+
value_view: _get(globalSettings, "table_menu.value_view"),
|
|
197
|
+
totals: _get(globalSettings, "table_menu.totals"),
|
|
198
|
+
filtering: _get(globalSettings, "table_menu.filtering", true),
|
|
199
|
+
column_resizing: _get(globalSettings, "table_menu.column_resizing", true),
|
|
200
|
+
column_arrangement: _get(globalSettings, "table_menu.column_arrangement", true),
|
|
201
|
+
column_update: _get(globalSettings, "table_menu.column_update", false),
|
|
202
|
+
change_aggregation: _get(globalSettings, "table_menu.change_aggregation", false),
|
|
203
|
+
pagination: isGrouped
|
|
204
|
+
? {
|
|
205
|
+
enabled: false,
|
|
206
|
+
recordsPage: 30,
|
|
207
|
+
}
|
|
208
|
+
: _get(globalSettings, "table_menu.pagination"),
|
|
209
|
+
},
|
|
210
|
+
[CHART_TYPE.EXPANDABLE_TABLE_CHART]: {
|
|
211
|
+
sorting: _get(globalSettings, "table_menu.sorting"),
|
|
212
|
+
value_view: _get(globalSettings, "table_menu.value_view"),
|
|
213
|
+
totals: _get(globalSettings, "table_menu.totals"),
|
|
214
|
+
},
|
|
215
|
+
[CHART_TYPE.INDICATOR_METRIC]: {
|
|
216
|
+
iconPosition: { label: _get(stylesSettings, "indicator_position") },
|
|
217
|
+
},
|
|
218
|
+
[CHART_TYPE.DIAL_METRIC]: {
|
|
219
|
+
color,
|
|
220
|
+
theme,
|
|
221
|
+
thresholdOpacity: opacity,
|
|
222
|
+
showComparison: _get(stylesSettings, "metric_comparison.value"),
|
|
223
|
+
comparisonColor: _get(stylesSettings, "metric_comparison.color"),
|
|
224
|
+
gaugeStyle: { label: _get(stylesSettings, "gauge") },
|
|
225
|
+
circleSize: { label: _get(stylesSettings, "dial_size") },
|
|
226
|
+
},
|
|
227
|
+
[CHART_TYPE.BULLET_METRIC]: {
|
|
228
|
+
color,
|
|
229
|
+
theme,
|
|
230
|
+
thresholdOpacity: opacity,
|
|
231
|
+
targetLabel: _get(stylesSettings, "bullet_target.label"),
|
|
232
|
+
targetColor: _get(stylesSettings, "bullet_target.color"),
|
|
233
|
+
targetIndicator: _get(stylesSettings, "bullet_target.indicator"),
|
|
234
|
+
targetValue: _get(stylesSettings, "bullet_target.value"),
|
|
235
|
+
},
|
|
236
|
+
[CHART_TYPE.FUNNEL_CHART]: Object.assign(Object.assign({}, stylesSettings), { orientation: stylesSettings.orientation }),
|
|
237
|
+
}[type] || {});
|
|
238
|
+
};
|
|
239
|
+
function parseMaps(stylesSettings) {
|
|
240
|
+
const { value, steps, min_value, max_value } = stylesSettings.custom_scale || {};
|
|
241
|
+
return {
|
|
242
|
+
baseMap: { label: _get(stylesSettings, "base_map") },
|
|
243
|
+
mapRegion: { label: _get(stylesSettings, "map_region") },
|
|
244
|
+
mapborder: _get(stylesSettings, "map_borders"),
|
|
245
|
+
opacity: _get(stylesSettings, "opacity", 10) / 10,
|
|
246
|
+
mapClustering: _get(stylesSettings, "map_clustering"),
|
|
247
|
+
mapDataLabels: _get(stylesSettings, "data_labels.value"),
|
|
248
|
+
color: {
|
|
249
|
+
values: (stylesSettings.theme || []).slice(0, 5),
|
|
250
|
+
},
|
|
251
|
+
custom: {
|
|
252
|
+
steps,
|
|
253
|
+
min: min_value,
|
|
254
|
+
max: max_value,
|
|
255
|
+
},
|
|
256
|
+
scale: {
|
|
257
|
+
type: value ? "Custom" : "Auto",
|
|
258
|
+
order: stylesSettings.reverse_color ? "Reverse" : "Default",
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function parseLabels(type2, stylesSettings) {
|
|
263
|
+
var _a, _b, _c, _d, _e;
|
|
264
|
+
const noLabelCharts = [
|
|
265
|
+
CHART_TYPE.CROSSTAB_CHART,
|
|
266
|
+
CHART_TYPE.TABLE_CHART,
|
|
267
|
+
CHART_TYPE.EXPANDABLE_TABLE_CHART,
|
|
268
|
+
CHART_TYPE.INDICATOR_METRIC,
|
|
269
|
+
CHART_TYPE.DIAL_METRIC,
|
|
270
|
+
CHART_TYPE.BULLET_METRIC,
|
|
271
|
+
];
|
|
272
|
+
if (noLabelCharts.includes(type2))
|
|
273
|
+
return false;
|
|
274
|
+
const { data_labels, x_axis, y_axis } = stylesSettings || {};
|
|
275
|
+
if (type2 === CHART_TYPE.PIE_CHART)
|
|
276
|
+
return data_labels.value;
|
|
277
|
+
const labels = {
|
|
278
|
+
axis: {
|
|
279
|
+
x: {
|
|
280
|
+
enabled: x_axis.showAxisTitle,
|
|
281
|
+
fontColor: x_axis.fontColor,
|
|
282
|
+
fontSize: x_axis.fontSize,
|
|
283
|
+
fontType: x_axis.fontType,
|
|
284
|
+
fontWeight: x_axis.fontWeight,
|
|
285
|
+
},
|
|
286
|
+
y: {
|
|
287
|
+
enabled: y_axis.showAxisTitle,
|
|
288
|
+
fontColor: y_axis.fontColor,
|
|
289
|
+
fontSize: y_axis.fontSize,
|
|
290
|
+
fontType: y_axis.fontType,
|
|
291
|
+
fontWeight: y_axis.fontWeight,
|
|
292
|
+
},
|
|
293
|
+
pivot: {
|
|
294
|
+
enabled: (_a = stylesSettings === null || stylesSettings === void 0 ? void 0 : stylesSettings.pivot_axis) === null || _a === void 0 ? void 0 : _a.showAxisTitle,
|
|
295
|
+
fontColor: (_b = stylesSettings === null || stylesSettings === void 0 ? void 0 : stylesSettings.pivot_axis) === null || _b === void 0 ? void 0 : _b.fontColor,
|
|
296
|
+
fontSize: (_c = stylesSettings === null || stylesSettings === void 0 ? void 0 : stylesSettings.pivot_axis) === null || _c === void 0 ? void 0 : _c.fontSize,
|
|
297
|
+
fontType: (_d = stylesSettings === null || stylesSettings === void 0 ? void 0 : stylesSettings.pivot_axis) === null || _d === void 0 ? void 0 : _d.fontType,
|
|
298
|
+
fontWeight: (_e = stylesSettings === null || stylesSettings === void 0 ? void 0 : stylesSettings.pivot_axis) === null || _e === void 0 ? void 0 : _e.fontWeight,
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
value: {
|
|
302
|
+
x: {
|
|
303
|
+
enabled: x_axis.values,
|
|
304
|
+
rotation: x_axis.rotation,
|
|
305
|
+
customRotation: x_axis.customRotation,
|
|
306
|
+
customValue: x_axis.customValue,
|
|
307
|
+
fontColor: x_axis.fontColorValues,
|
|
308
|
+
fontSize: x_axis.fontSizeValues,
|
|
309
|
+
fontType: x_axis.fontTypeValues,
|
|
310
|
+
fontWeight: x_axis.fontWeightValues,
|
|
311
|
+
},
|
|
312
|
+
y: {
|
|
313
|
+
enabled: y_axis.values,
|
|
314
|
+
rotation: y_axis.rotation,
|
|
315
|
+
customRotation: y_axis.customRotation,
|
|
316
|
+
customValue: y_axis.customValue,
|
|
317
|
+
fontColor: y_axis.fontColorValues,
|
|
318
|
+
fontSize: y_axis.fontSizeValues,
|
|
319
|
+
fontType: y_axis.fontTypeValues,
|
|
320
|
+
fontWeight: y_axis.fontWeightValues,
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
data: {
|
|
324
|
+
enabled: data_labels.value,
|
|
325
|
+
border: _get(stylesSettings, "data_labels.simple_labels.border", true),
|
|
326
|
+
},
|
|
327
|
+
scale: {
|
|
328
|
+
x: x_axis.scale,
|
|
329
|
+
y: y_axis.scale,
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
if (type2 === CHART_TYPE.HEATMAP_CHART)
|
|
333
|
+
delete labels.data;
|
|
334
|
+
return labels;
|
|
335
|
+
}
|
|
336
|
+
function parseHeatMap(stylesSettings) {
|
|
337
|
+
return {
|
|
338
|
+
celltext: _get(stylesSettings, "data_labels.value"),
|
|
339
|
+
color: {
|
|
340
|
+
values: (stylesSettings.theme || []).slice(0, 5),
|
|
341
|
+
},
|
|
342
|
+
custom: {
|
|
343
|
+
steps: _get(stylesSettings, "custom_scale.steps"),
|
|
344
|
+
min: _get(stylesSettings, "custom_scale.min_value"),
|
|
345
|
+
max: _get(stylesSettings, "custom_scale.max_value"),
|
|
346
|
+
},
|
|
347
|
+
gap: Object.assign({}, stylesSettings.gaps),
|
|
348
|
+
yAxisRotation: _get(stylesSettings, "y_axis.rotation"),
|
|
349
|
+
labelRotation: _get(stylesSettings, "pivot_axis.rotation"),
|
|
350
|
+
scale: {
|
|
351
|
+
type: _get(stylesSettings, "custom_scale.value") ? "Custom" : "Auto",
|
|
352
|
+
order: stylesSettings.reverse_color ? "Reverse" : "Default",
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
export const parseTableChart = ({ stylesSettings, globalSettings }) => {
|
|
357
|
+
return {
|
|
358
|
+
size: globalSettings.size,
|
|
359
|
+
maxNumGroups: _get(globalSettings, "max_groups.option"),
|
|
360
|
+
theme: {
|
|
361
|
+
name: "Theme 1",
|
|
362
|
+
values: stylesSettings.color,
|
|
363
|
+
},
|
|
364
|
+
maxNumRows: _get(globalSettings, "max_rows.option"),
|
|
365
|
+
sort_by_column: _get(globalSettings, "sort_by_column"),
|
|
366
|
+
sort_by_multi_columns: _get(globalSettings, "sort_by_multi_columns"),
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
export const parseCrosstabChart = ({ stylesSettings, globalSettings }) => {
|
|
370
|
+
return {
|
|
371
|
+
size: globalSettings.size,
|
|
372
|
+
theme: {
|
|
373
|
+
name: "Theme 1",
|
|
374
|
+
values: stylesSettings.color,
|
|
375
|
+
},
|
|
376
|
+
labels: _get(globalSettings, "crosstab_labels.value"),
|
|
377
|
+
sortX: _get(globalSettings, "crosstab_labels.option.sorting"),
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
export const parseMetricGlobal = ({ globalSettings, stylesSettings }) => {
|
|
381
|
+
let format3 = _get(stylesSettings, "format.value", "Default");
|
|
382
|
+
const templateFormat = _get(stylesSettings, "format.template") ||
|
|
383
|
+
_get(stylesSettings, "y_axis.format.template");
|
|
384
|
+
const customization = {
|
|
385
|
+
filtering: _get(globalSettings, "table_menu.filtering", true),
|
|
386
|
+
download: omit(_get(globalSettings, "customization.download"), ["csv"]),
|
|
387
|
+
};
|
|
388
|
+
if (_get(stylesSettings, "format.value", "") === "Numeric") {
|
|
389
|
+
format3 = "Decimal";
|
|
390
|
+
}
|
|
391
|
+
return {
|
|
392
|
+
numberFormat: format3,
|
|
393
|
+
templateFormat,
|
|
394
|
+
comparisonType: "CHANGE",
|
|
395
|
+
desctription: false,
|
|
396
|
+
animation: _get(stylesSettings, "animation", {}),
|
|
397
|
+
indicator_font: _get(stylesSettings, "indicator_font", {}),
|
|
398
|
+
indicator_symbol: _get(stylesSettings, "indicator_symbol", {}),
|
|
399
|
+
comparison_font: _get(stylesSettings, "comparison_font", {}),
|
|
400
|
+
decimals: _get(stylesSettings, "format.decimals", 2),
|
|
401
|
+
currency: { label: _get(stylesSettings, "format.currency", "$") },
|
|
402
|
+
fixedScale: {
|
|
403
|
+
min: _get(globalSettings, "metric_scale.value", false)
|
|
404
|
+
? _get(globalSettings, "metric_scale.min_value")
|
|
405
|
+
: null,
|
|
406
|
+
max: _get(globalSettings, "metric_scale.value", false)
|
|
407
|
+
? _get(globalSettings, "metric_scale.max_value")
|
|
408
|
+
: null,
|
|
409
|
+
},
|
|
410
|
+
customization,
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
export const getSortBy = (type) => {
|
|
414
|
+
return [
|
|
415
|
+
CHART_TYPE.AREA_CHART,
|
|
416
|
+
CHART_TYPE.BAR_CHART,
|
|
417
|
+
CHART_TYPE.LINE_CHART,
|
|
418
|
+
CHART_TYPE.SYMBOL_CHART,
|
|
419
|
+
CHART_TYPE.MINMAX_CHART,
|
|
420
|
+
CHART_TYPE.COMBO_CHART,
|
|
421
|
+
CHART_TYPE.BAR_CHART_MS,
|
|
422
|
+
CHART_TYPE.LINE_CHART_MS,
|
|
423
|
+
CHART_TYPE.RADAR_CHART,
|
|
424
|
+
CHART_TYPE.SYMBOL_CHART_MS,
|
|
425
|
+
CHART_TYPE.FUNNEL_CHART,
|
|
426
|
+
CHART_TYPE.HEATMAP_CHART,
|
|
427
|
+
CHART_TYPE.COMBINED_CHART,
|
|
428
|
+
CHART_TYPE.AREA_CHART_MS,
|
|
429
|
+
].includes(type)
|
|
430
|
+
? "sort_by_column"
|
|
431
|
+
: "sort_by";
|
|
432
|
+
};
|
|
433
|
+
const getSortByType = (globalSettings, type2) => {
|
|
434
|
+
return (_get(globalSettings, getSortBy(type2)) ||
|
|
435
|
+
_get(globalSettings, "sort_by") || {
|
|
436
|
+
type: "Value",
|
|
437
|
+
order: "Desc",
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
export const parseGlobalSettingByType = (type2, { stylesSettings, globalSettings, dimensions }) => {
|
|
441
|
+
var _a, _b;
|
|
442
|
+
const theme = { values: stylesSettings.theme };
|
|
443
|
+
const typeCategory = _get((_a = dimensions.categories) === null || _a === void 0 ? void 0 : _a[0], "type");
|
|
444
|
+
const typeValue = _get((_b = dimensions.values) === null || _b === void 0 ? void 0 : _b[0], "type");
|
|
445
|
+
const trueTypeCategory = typeCategory || typeValue;
|
|
446
|
+
const base = {
|
|
447
|
+
color_type: _get(stylesSettings, "color_type"),
|
|
448
|
+
match_colors: _get(stylesSettings, "match_colors"),
|
|
449
|
+
custom_color: _get(stylesSettings, "custom_color"),
|
|
450
|
+
custom_theme: _get(stylesSettings, "custom_theme"),
|
|
451
|
+
theme,
|
|
452
|
+
size: globalSettings.size,
|
|
453
|
+
labels: parseLabels(type2, stylesSettings),
|
|
454
|
+
legends: globalSettings.legend ? globalSettings.legend !== "NONE" : false,
|
|
455
|
+
tooltips: _get(globalSettings, "tooltips.value"),
|
|
456
|
+
custom_tooltips: _get(globalSettings, "tooltips.advanced"),
|
|
457
|
+
scale: {
|
|
458
|
+
type: _get(stylesSettings, "custom_scale.value") ? "Custom" : "Auto",
|
|
459
|
+
order: stylesSettings.reverse_color ? "Reverse" : "Default",
|
|
460
|
+
},
|
|
461
|
+
sortX: getSortByType(globalSettings, type2),
|
|
462
|
+
sortAggregation: globalSettings.aggregation_sort,
|
|
463
|
+
sortCalculation: globalSettings.table_calculation_sort,
|
|
464
|
+
calculation_direction: globalSettings.calculation_direction,
|
|
465
|
+
maxNumValuePoints: _get(globalSettings, "max_value_point.option", 500),
|
|
466
|
+
maxNumDataPoints: _get(globalSettings, "max_data_point.option"),
|
|
467
|
+
maxDataPoints: trueTypeCategory === "DATE"
|
|
468
|
+
? false
|
|
469
|
+
: _get(globalSettings, "max_data_point.value"),
|
|
470
|
+
average: globalSettings.average,
|
|
471
|
+
startDate: globalSettings.startDate,
|
|
472
|
+
endDate: globalSettings.endDate,
|
|
473
|
+
startTime: globalSettings.startTime,
|
|
474
|
+
endTime: globalSettings.endTime,
|
|
475
|
+
startNumeric: globalSettings.startNumeric,
|
|
476
|
+
endNumeric: globalSettings.endNumeric,
|
|
477
|
+
chartVersion: _get(globalSettings, "chartVersion"),
|
|
478
|
+
};
|
|
479
|
+
const customization = {
|
|
480
|
+
filtering: _get(globalSettings, "table_menu.filtering", true),
|
|
481
|
+
sorting: _get(globalSettings, "table_menu.sorting", false),
|
|
482
|
+
fitPanel: _get(globalSettings, "customization.fitPanel", true),
|
|
483
|
+
chartSelection: _get(globalSettings, "customization.chartSelection", false),
|
|
484
|
+
download: _get(globalSettings, "customization.download"),
|
|
485
|
+
columnReplacement: _get(globalSettings, "customization.columnReplacement"),
|
|
486
|
+
columnAggregation: _get(globalSettings, "customization.columnAggregation"),
|
|
487
|
+
dateGrouping: _get(globalSettings, "customization.dateGrouping"),
|
|
488
|
+
};
|
|
489
|
+
const notXYCustomization = {
|
|
490
|
+
filtering: _get(globalSettings, "table_menu.filtering", true),
|
|
491
|
+
download: _get(globalSettings, "customization.download"),
|
|
492
|
+
};
|
|
493
|
+
const circularCustomization = Object.assign(Object.assign({}, notXYCustomization), { chartSelection: customization.chartSelection, sorting: customization.sorting, columnReplacement: _get(globalSettings, "customization.columnReplacement"), columnAggregation: _get(globalSettings, "customization.columnAggregation"), dateGrouping: _get(globalSettings, "customization.dateGrouping") });
|
|
494
|
+
return ({
|
|
495
|
+
[CHART_TYPE.BAR_CHART]: Object.assign(Object.assign({}, base), { hideShading: !stylesSettings.shadding, fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
496
|
+
[CHART_TYPE.BAR_CHART_MS]: Object.assign(Object.assign({}, base), { hideShading: true, fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
497
|
+
[CHART_TYPE.SYMBOL_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
498
|
+
[CHART_TYPE.SYMBOL_CHART_MS]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
499
|
+
[CHART_TYPE.LINE_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
500
|
+
[CHART_TYPE.LINE_CHART_MS]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
501
|
+
[CHART_TYPE.RADAR_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization: circularCustomization }),
|
|
502
|
+
[CHART_TYPE.COMBO_CHART]: Object.assign(Object.assign({}, base), { hideShading: true, fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
503
|
+
[CHART_TYPE.HEATMAP_CHART]: Object.assign(Object.assign(Object.assign({}, base), parseHeatMap(stylesSettings)), { customization: notXYCustomization }),
|
|
504
|
+
[CHART_TYPE.WORD_CLOUD]: Object.assign(Object.assign({}, base), { customization: notXYCustomization }),
|
|
505
|
+
[CHART_TYPE.MINMAX_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
506
|
+
[CHART_TYPE.PIE_CHART]: Object.assign(Object.assign({}, base), { customization: circularCustomization }),
|
|
507
|
+
[CHART_TYPE.REFERENCE]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false) }),
|
|
508
|
+
[CHART_TYPE.TREND]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false) }),
|
|
509
|
+
[CHART_TYPE.SCATTER_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
510
|
+
[CHART_TYPE.SMALL_MULTIPLES]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false) }),
|
|
511
|
+
[CHART_TYPE.BOXWHISKER_CHART]: Object.assign(Object.assign({}, base), { enableDataLabels: true, labelRotation: _get(stylesSettings, "x_axis.rotation"), orientation: capitalize((stylesSettings.orientation || "").toString()), hasPivot: hasDimension(dimensions, CHART_DIMENSION.PIVOT), customization: {
|
|
512
|
+
filtering: customization.filtering,
|
|
513
|
+
download: omit(customization.download, ["csvSummary"]),
|
|
514
|
+
} }),
|
|
515
|
+
[CHART_TYPE.GEO_CHART_BUBBLE]: Object.assign(Object.assign({}, base), { theme: { values: [stylesSettings.color] }, customization: notXYCustomization }),
|
|
516
|
+
[CHART_TYPE.GEO_CHART_DOT]: Object.assign(Object.assign({}, base), { theme: { values: [stylesSettings.color] }, legends: false, customization: notXYCustomization }),
|
|
517
|
+
[CHART_TYPE.GEO_CHART_CHOROPLETH]: Object.assign(Object.assign({}, base), { theme: { values: [stylesSettings.color] }, customization: notXYCustomization }),
|
|
518
|
+
[CHART_TYPE.GEO_CHART]: Object.assign(Object.assign({}, base), { customization: notXYCustomization }),
|
|
519
|
+
[CHART_TYPE.CROSSTAB_CHART]: Object.assign(Object.assign({}, parseCrosstabChart({ globalSettings, stylesSettings })), { customization: Object.assign(Object.assign({}, notXYCustomization), { sorting: customization.sorting }) }),
|
|
520
|
+
[CHART_TYPE.TABLE_CHART]: Object.assign(Object.assign({}, parseTableChart({ globalSettings, stylesSettings })), { customization: {
|
|
521
|
+
download: _get(globalSettings, "customization.download"),
|
|
522
|
+
} }),
|
|
523
|
+
[CHART_TYPE.EXPANDABLE_TABLE_CHART]: Object.assign(Object.assign({}, parseTableChart({ globalSettings, stylesSettings })), { customization: notXYCustomization }),
|
|
524
|
+
[CHART_TYPE.INDICATOR_METRIC]: Object.assign(Object.assign({}, parseMetricGlobal({ globalSettings, stylesSettings })), { tooltips: base.tooltips, custom_tooltips: base.custom_tooltips }),
|
|
525
|
+
[CHART_TYPE.DIAL_METRIC]: Object.assign(Object.assign({}, parseMetricGlobal({ globalSettings, stylesSettings })), { legend: base.legends, tooltips: base.tooltips, custom_tooltips: base.custom_tooltips }),
|
|
526
|
+
[CHART_TYPE.BULLET_METRIC]: Object.assign(Object.assign({}, parseMetricGlobal({ globalSettings, stylesSettings })), { legend: base.legends, tooltips: base.tooltips, custom_tooltips: base.custom_tooltips }),
|
|
527
|
+
[CHART_TYPE.FUNNEL_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization: notXYCustomization }),
|
|
528
|
+
[CHART_TYPE.COMBINED_CHART]: Object.assign(Object.assign({}, base), { hideShading: true, fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
529
|
+
[CHART_TYPE.AREA_CHART]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
530
|
+
[CHART_TYPE.AREA_CHART_MS]: Object.assign(Object.assign({}, base), { fit_panel: _get(globalSettings, "fit_panel", false), customization }),
|
|
531
|
+
}[type2] || {});
|
|
532
|
+
};
|