sea-chart 2.0.42 → 2.0.44
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/components/color-popover/color-rules/rule-filters/number-input.js +2 -2
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +2 -2
- package/dist/components/tooltip/index.js +11 -4
- package/dist/constants/index.js +8 -3
- package/dist/context.js +10 -7
- package/dist/model/base-model.js +4 -0
- package/dist/model/combination.js +4 -0
- package/dist/model/horizontal-bar.js +4 -0
- package/dist/model/horizontal-group-bar.js +5 -1
- package/dist/model/stacked-horizontal-bar.js +4 -0
- package/dist/settings/advance-bar-settings/style-settings.js +24 -7
- package/dist/settings/bar-settings/style-settings.js +24 -7
- package/dist/settings/combination-settings/style-settings.js +35 -10
- package/dist/settings/time-comparison-settings/style-settings.js +24 -7
- package/dist/settings/widgets/axis-title-font-settings/index.js +39 -0
- package/dist/utils/cell-format-utils.js +2 -2
- package/dist/utils/chart-utils/base-utils.js +49 -13
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +4 -3
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +3 -3
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +2 -2
- package/dist/utils/chart-utils/sql-statistics-utils.js +64 -18
- package/dist/utils/row-record-utils.js +21 -5
- package/dist/utils/sql/column-2-sql-column.js +2 -0
- package/dist/view/index.css +0 -17
- package/dist/view/wrapper/area-group.js +14 -25
- package/dist/view/wrapper/area.js +14 -27
- package/dist/view/wrapper/bar-compare.js +10 -15
- package/dist/view/wrapper/bar-custom-stack.js +19 -81
- package/dist/view/wrapper/bar-group.js +15 -50
- package/dist/view/wrapper/bar-stack.js +12 -40
- package/dist/view/wrapper/bar.js +10 -23
- package/dist/view/wrapper/basic-number-card.js +9 -2
- package/dist/view/wrapper/chart-component.js +461 -76
- package/dist/view/wrapper/combination.js +17 -29
- package/dist/view/wrapper/completeness-group.js +13 -59
- package/dist/view/wrapper/completeness.js +14 -60
- package/dist/view/wrapper/dashboard.js +8 -14
- package/dist/view/wrapper/funnel.js +6 -18
- package/dist/view/wrapper/heat-map.js +80 -50
- package/dist/view/wrapper/horizontal-bar-group.js +14 -25
- package/dist/view/wrapper/horizontal-bar-stack.js +16 -61
- package/dist/view/wrapper/horizontal-bar.js +10 -25
- package/dist/view/wrapper/index.js +3 -0
- package/dist/view/wrapper/line-group.js +11 -21
- package/dist/view/wrapper/line.js +11 -23
- package/dist/view/wrapper/map-bubble.js +9 -14
- package/dist/view/wrapper/map-world-bubble.js +9 -14
- package/dist/view/wrapper/map-world.js +9 -14
- package/dist/view/wrapper/map.js +9 -13
- package/dist/view/wrapper/mirror.js +7 -20
- package/dist/view/wrapper/pie.js +9 -12
- package/dist/view/wrapper/ring.js +10 -13
- package/dist/view/wrapper/scatter.js +13 -23
- package/dist/view/wrapper/table/pivot-table-display-name.js +2 -2
- package/dist/view/wrapper/table-element/components/formatter.js +2 -2
- package/dist/view/wrapper/table-element/components/records-body.js +8 -2
- package/dist/view/wrapper/table-element/components/records.js +2 -4
- package/dist/view/wrapper/treemap.js +8 -18
- package/dist/view/wrapper/trend.js +3 -2
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* support type number with format
|
|
3
3
|
*/
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
|
-
import { DEFAULT_NUMBER_FORMAT, formatStringToNumber, getNumberDisplayString, replaceNumberNotAllowInput } from 'dtable-utils';
|
|
5
|
+
import { DEFAULT_NUMBER_FORMAT, formatStringToNumber, getNumberDisplayString, replaceNumberNotAllowInput, isEmpty } from 'dtable-utils';
|
|
6
6
|
class NumberInput extends Component {
|
|
7
7
|
constructor(props) {
|
|
8
8
|
super(props);
|
|
@@ -17,7 +17,7 @@ class NumberInput extends Component {
|
|
|
17
17
|
} else if (valueType === 'string') {
|
|
18
18
|
numericValue = formatStringToNumber(value, {});
|
|
19
19
|
}
|
|
20
|
-
if (
|
|
20
|
+
if (isEmpty(numericValue)) {
|
|
21
21
|
return '';
|
|
22
22
|
}
|
|
23
23
|
return getNumberDisplayString(numericValue, {}) || '';
|
|
@@ -44,10 +44,10 @@ export default function DrillDownFieldsPopover(_ref) {
|
|
|
44
44
|
onPopoverToggle(false);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
document.addEventListener('click', hidePopover);
|
|
47
|
+
document.addEventListener('click', hidePopover, true);
|
|
48
48
|
document.addEventListener('keydown', onHotKey);
|
|
49
49
|
return () => {
|
|
50
|
-
document.removeEventListener('click', hidePopover);
|
|
50
|
+
document.removeEventListener('click', hidePopover, true);
|
|
51
51
|
document.removeEventListener('keydown', onHotKey);
|
|
52
52
|
};
|
|
53
53
|
}, [onPopoverToggle]);
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import React, { useState, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { isEmpty } from 'dtable-utils';
|
|
3
|
+
const formatDisplayValue = value => {
|
|
4
|
+
if (isEmpty(value)) return '';
|
|
5
|
+
if (Array.isArray(value)) return value.join(', ');
|
|
6
|
+
if (typeof value === 'object') return '';
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
2
9
|
const ToolTip = _ref => {
|
|
3
10
|
let {
|
|
4
11
|
tooltipData,
|
|
@@ -82,7 +89,7 @@ const ToolTip = _ref => {
|
|
|
82
89
|
visibility: position.offsetX === -9999 ? 'hidden' : 'visible',
|
|
83
90
|
opacity: position.offsetX === -9999 ? 0 : 1
|
|
84
91
|
}
|
|
85
|
-
}, title && /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
}, !isEmpty(title) && /*#__PURE__*/React.createElement("div", {
|
|
86
93
|
className: "sea-chart-d3-tooltip-title"
|
|
87
94
|
}, titleMarkColor && /*#__PURE__*/React.createElement("span", {
|
|
88
95
|
style: {
|
|
@@ -93,7 +100,7 @@ const ToolTip = _ref => {
|
|
|
93
100
|
display: 'inline-block',
|
|
94
101
|
marginRight: '12px'
|
|
95
102
|
}
|
|
96
|
-
}), title), /*#__PURE__*/React.createElement("ul", {
|
|
103
|
+
}), formatDisplayValue(title)), /*#__PURE__*/React.createElement("ul", {
|
|
97
104
|
className: "sea-chart-d3-tooltip-list"
|
|
98
105
|
}, items.map((item, index) => {
|
|
99
106
|
return /*#__PURE__*/React.createElement("li", {
|
|
@@ -106,9 +113,9 @@ const ToolTip = _ref => {
|
|
|
106
113
|
}
|
|
107
114
|
}), /*#__PURE__*/React.createElement("span", {
|
|
108
115
|
className: "sea-chart-d3-tooltip-name"
|
|
109
|
-
}, item.name), /*#__PURE__*/React.createElement("span", {
|
|
116
|
+
}, formatDisplayValue(item.name)), /*#__PURE__*/React.createElement("span", {
|
|
110
117
|
className: "sea-chart-d3-tooltip-value"
|
|
111
|
-
}, item.value));
|
|
118
|
+
}, formatDisplayValue(item.value)));
|
|
112
119
|
})));
|
|
113
120
|
};
|
|
114
121
|
export default ToolTip;
|
package/dist/constants/index.js
CHANGED
|
@@ -170,8 +170,12 @@ export const BAR_MAP_TO_HORIZONTAL_MAP = {
|
|
|
170
170
|
y_axis_summary_column_key: 'horizontal_axis_column_key',
|
|
171
171
|
x_axis_show_label: 'show_vertical_axis_label',
|
|
172
172
|
x_axis_label_position: 'vertical_axis_label_position',
|
|
173
|
+
x_axis_label_font_size: 'vertical_axis_label_font_size',
|
|
174
|
+
x_axis_label_font_color: 'vertical_axis_label_font_color',
|
|
173
175
|
y_axis_show_label: 'show_horizontal_axis_label',
|
|
174
176
|
y_axis_label_position: 'horizontal_axis_label_position',
|
|
177
|
+
y_axis_label_font_size: 'horizontal_axis_label_font_size',
|
|
178
|
+
y_axis_label_font_color: 'horizontal_axis_label_font_color',
|
|
175
179
|
y_axis_show_value: 'display_data',
|
|
176
180
|
y_axis_label_color: 'horizontal_axis_label_color',
|
|
177
181
|
y_axis_auto_range: 'horizontal_axis_auto_range',
|
|
@@ -184,6 +188,7 @@ export const DEFAULT_NUMBER_FORMAT_OBJECT = {
|
|
|
184
188
|
export const TITLE_INCREASE = 'Increase';
|
|
185
189
|
export const TITLE_AMOUNT = 'Amount';
|
|
186
190
|
export const EMPTY_NAME = 'Empty';
|
|
191
|
+
export const DEFAULT_ITEM_COLOR = '#dbdbdb';
|
|
187
192
|
export const THEME_NAME_MAP = {
|
|
188
193
|
DARK: 'dark',
|
|
189
194
|
LIGHT: 'light'
|
|
@@ -251,6 +256,9 @@ export const LABEL_FONT_COLOR_MAP = {
|
|
|
251
256
|
[THEME_NAME_MAP.LIGHT]: DEFAULT_CARD_LABEL_FONT_COLOR_LIGHT,
|
|
252
257
|
[THEME_NAME_MAP.DARK]: DEFAULT_CARD_LABEL_FONT_COLOR_DARK
|
|
253
258
|
};
|
|
259
|
+
export const DEFAULT_AXIS_LABEL_FONT_COLOR = '#999999';
|
|
260
|
+
export const DEFAULT_AXIS_LABEL_FONT_COLOR_DARK = '#ffffff';
|
|
261
|
+
export const DEFAULT_AXIS_LABEL_FONT_SIZE = 12;
|
|
254
262
|
export const CHART_SETTINGS_TYPE = {
|
|
255
263
|
DATA: 'data',
|
|
256
264
|
CHART_STYLE: 'style',
|
|
@@ -287,9 +295,6 @@ export const TYPE_DISPLAY_COLOR_USING = {
|
|
|
287
295
|
// default grid size, grid distance for heat map chart
|
|
288
296
|
export const DEFAULT_GRID_SIZE = 12;
|
|
289
297
|
export const DEFAULT_GRID_DISTANCE = 4;
|
|
290
|
-
|
|
291
|
-
// default mediaUrl
|
|
292
|
-
export const DEFAULT_MEDIAURL = 'https://dev.seatable.cn/media/';
|
|
293
298
|
export const MONTH_MIRROR = {
|
|
294
299
|
'0': 'Jan',
|
|
295
300
|
'1': 'Feb',
|
package/dist/context.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getTableById } from 'dtable-utils';
|
|
2
2
|
import CollaboratorManager from './utils/collaborator-manager';
|
|
3
3
|
import { ChartDataSQL } from './utils';
|
|
4
|
-
import { CHART_TYPE, CHART_TYPE_IMAGE
|
|
4
|
+
import { CHART_TYPE, CHART_TYPE_IMAGE } from './constants';
|
|
5
5
|
class Context {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.queryChartResult = _ref => {
|
|
@@ -120,14 +120,17 @@ class Context {
|
|
|
120
120
|
};
|
|
121
121
|
this.getChartImageUrl = type => {
|
|
122
122
|
const name = CHART_TYPE_IMAGE[type];
|
|
123
|
+
let server = '';
|
|
124
|
+
let mediaUrl = '';
|
|
123
125
|
if (Reflect.ownKeys(this.settings).length !== 0) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
mediaUrl
|
|
127
|
-
} = this.settings;
|
|
128
|
-
return `${server}${mediaUrl}dtable-statistic/img/${name}?v=0.0.1`;
|
|
126
|
+
server = this.settings.server;
|
|
127
|
+
mediaUrl = this.settings.mediaUrl;
|
|
129
128
|
}
|
|
130
|
-
|
|
129
|
+
if (!server || !mediaUrl) {
|
|
130
|
+
server = window.dtable ? window.dtable.server : '';
|
|
131
|
+
mediaUrl = window.dtable ? window.dtable.mediaUrl : '';
|
|
132
|
+
}
|
|
133
|
+
return `${server}${mediaUrl}dtable-statistic/img/${name}?v=0.0.1`;
|
|
131
134
|
};
|
|
132
135
|
this.api = null;
|
|
133
136
|
this.settings = {};
|
package/dist/model/base-model.js
CHANGED
|
@@ -9,5 +9,9 @@ export default class BaseModel {
|
|
|
9
9
|
this.drill_down_fields = options.drill_down_fields || null;
|
|
10
10
|
// default set to true
|
|
11
11
|
this.drill_down_status = typeof options.drill_down_status === 'boolean' ? options.drill_down_status : true;
|
|
12
|
+
this.x_axis_label_font_size = options.x_axis_label_font_size;
|
|
13
|
+
this.x_axis_label_font_color = options.x_axis_label_font_color;
|
|
14
|
+
this.y_axis_label_font_size = options.y_axis_label_font_size;
|
|
15
|
+
this.y_axis_label_font_color = options.y_axis_label_font_color;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -35,6 +35,10 @@ class Combination extends BaseModel {
|
|
|
35
35
|
this.display_data = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
36
36
|
this.label_font_size = options.label_font_size;
|
|
37
37
|
this.line_type = options.line_type || CHART_LINE_TYPES[1];
|
|
38
|
+
this.y_axis_left_label_font_size = options.y_axis_left_label_font_size;
|
|
39
|
+
this.y_axis_left_label_font_color = options.y_axis_left_label_font_color;
|
|
40
|
+
this.y_axis_right_label_font_size = options.y_axis_right_label_font_size;
|
|
41
|
+
this.y_axis_right_label_font_color = options.y_axis_right_label_font_color;
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
export default Combination;
|
|
@@ -17,6 +17,8 @@ class HorizontalBar extends BaseModel {
|
|
|
17
17
|
// vertical axis style
|
|
18
18
|
this.show_vertical_axis_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
19
|
this.vertical_axis_label_position = options.x_axis_label_position;
|
|
20
|
+
this.vertical_axis_label_font_size = options.x_axis_label_font_size;
|
|
21
|
+
this.vertical_axis_label_font_color = options.x_axis_label_font_color;
|
|
20
22
|
|
|
21
23
|
// horizontal axis data
|
|
22
24
|
this.horizontal_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
@@ -27,6 +29,8 @@ class HorizontalBar extends BaseModel {
|
|
|
27
29
|
this.horizontal_axis_label_color = options.y_axis_label_color;
|
|
28
30
|
this.show_horizontal_axis_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
31
|
this.horizontal_axis_label_position = options.y_axis_label_position;
|
|
32
|
+
this.horizontal_axis_label_font_size = options.y_axis_label_font_size;
|
|
33
|
+
this.horizontal_axis_label_font_color = options.y_axis_label_font_color;
|
|
30
34
|
this.display_data = isBoolean(options.y_axis_show_value) ? options.y_axis_show_value : false;
|
|
31
35
|
this.horizontal_axis_auto_range = options.y_axis_auto_range;
|
|
32
36
|
this.horizontal_axis_min = options.y_axis_min;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BaseModel from './base-model';
|
|
2
1
|
import { isBoolean } from '../utils';
|
|
3
2
|
import { CHART_TYPE, CHART_SUMMARY_TYPE } from '../constants';
|
|
3
|
+
import BaseModel from './base-model';
|
|
4
4
|
class HorizontalGroupBar extends BaseModel {
|
|
5
5
|
constructor(options) {
|
|
6
6
|
super({
|
|
@@ -17,6 +17,8 @@ class HorizontalGroupBar extends BaseModel {
|
|
|
17
17
|
// vertical axis style
|
|
18
18
|
this.show_vertical_axis_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
19
|
this.vertical_axis_label_position = options.x_axis_label_position;
|
|
20
|
+
this.vertical_axis_label_font_size = options.x_axis_label_font_size;
|
|
21
|
+
this.vertical_axis_label_font_color = options.x_axis_label_font_color;
|
|
20
22
|
|
|
21
23
|
// horizontal axis data
|
|
22
24
|
this.horizontal_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
@@ -27,6 +29,8 @@ class HorizontalGroupBar extends BaseModel {
|
|
|
27
29
|
this.horizontal_axis_label_color = options.y_axis_label_color;
|
|
28
30
|
this.show_horizontal_axis_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
31
|
this.horizontal_axis_label_position = options.y_axis_label_position;
|
|
32
|
+
this.horizontal_axis_label_font_size = options.y_axis_label_font_size;
|
|
33
|
+
this.horizontal_axis_label_font_color = options.y_axis_label_font_color;
|
|
30
34
|
this.horizontal_axis_auto_range = options.y_axis_auto_range;
|
|
31
35
|
this.horizontal_axis_min = options.y_axis_min;
|
|
32
36
|
this.horizontal_axis_max = options.y_axis_max;
|
|
@@ -17,6 +17,8 @@ class StackedHorizontalGroupBar extends BaseModel {
|
|
|
17
17
|
// vertical axis style
|
|
18
18
|
this.show_vertical_axis_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
19
|
this.vertical_axis_label_position = options.x_axis_label_position;
|
|
20
|
+
this.vertical_axis_label_font_size = options.x_axis_label_font_size;
|
|
21
|
+
this.vertical_axis_label_font_color = options.x_axis_label_font_color;
|
|
20
22
|
|
|
21
23
|
// horizontal axis data
|
|
22
24
|
this.horizontal_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
@@ -27,6 +29,8 @@ class StackedHorizontalGroupBar extends BaseModel {
|
|
|
27
29
|
this.horizontal_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
28
30
|
this.show_horizontal_axis_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
31
|
this.horizontal_axis_label_position = options.y_axis_label_position;
|
|
32
|
+
this.horizontal_axis_label_font_size = options.y_axis_label_font_size;
|
|
33
|
+
this.horizontal_axis_label_font_color = options.y_axis_label_font_color;
|
|
30
34
|
this.horizontal_axis_auto_range = options.y_axis_auto_range;
|
|
31
35
|
this.horizontal_axis_min = options.y_axis_min;
|
|
32
36
|
this.horizontal_axis_max = options.y_axis_max;
|
|
@@ -2,7 +2,7 @@ import _CollapsibleSettingLayout from "dtable-ui-component/lib/CollapsibleSettin
|
|
|
2
2
|
import _DTableRadioGroup from "dtable-ui-component/lib/DTableRadioGroup";
|
|
3
3
|
import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
|
|
4
4
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
5
|
-
import { Label, Input
|
|
5
|
+
import { Label, Input } from 'reactstrap';
|
|
6
6
|
import { CellType } from 'dtable-utils';
|
|
7
7
|
import Divider from '../widgets/divider';
|
|
8
8
|
import MinMaxSetting from '../widgets/min-max-setting';
|
|
@@ -10,6 +10,7 @@ import DisplayValuesSettings from '../widgets/display-values-settings';
|
|
|
10
10
|
import { X_LABEL_POSITIONS, Y_LABEL_POSITIONS, LABEL_POSITION_TYPE_SHOW, SUPPORT_STACK_VALUE_CHART_TYPES, CHART_TYPE, SUPPORT_GOAL_LINE_CHART_TYPES } from '../../constants';
|
|
11
11
|
import intl from '../../intl';
|
|
12
12
|
import SelectLineType from '../widgets/select-line-type';
|
|
13
|
+
import AxisTitleFontSettings from '../widgets/axis-title-font-settings';
|
|
13
14
|
import ColorSelector from '../../components/chart-color-selector/color-selector';
|
|
14
15
|
import { SUPPORT_SINGLE_SELECT_THEMES_OPTIONS } from '../../constants/color-rules';
|
|
15
16
|
import { getColumnByKey } from '../../utils';
|
|
@@ -38,6 +39,10 @@ const StyleSettings = _ref => {
|
|
|
38
39
|
y_axis_max,
|
|
39
40
|
y_axis_show_value,
|
|
40
41
|
label_font_size,
|
|
42
|
+
x_axis_label_font_size,
|
|
43
|
+
x_axis_label_font_color,
|
|
44
|
+
y_axis_label_font_size,
|
|
45
|
+
y_axis_label_font_color,
|
|
41
46
|
display_each_block_data,
|
|
42
47
|
line_type,
|
|
43
48
|
title_name,
|
|
@@ -174,14 +179,20 @@ const StyleSettings = _ref => {
|
|
|
174
179
|
checked: x_axis_show_label || false,
|
|
175
180
|
placeholder: intl.get('Display_title'),
|
|
176
181
|
onChange: () => onAxisLabelShowChange('x_axis_show_label')
|
|
177
|
-
}), x_axis_show_label && /*#__PURE__*/React.createElement(
|
|
178
|
-
className: "mt-3
|
|
182
|
+
}), x_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
179
184
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
180
185
|
activeOption: xAxisLabelPosition,
|
|
181
186
|
options: xAxisLabelOptions,
|
|
182
187
|
optionsDisplay: getLabelOptionsDisplay(xAxisLabelOptions),
|
|
183
188
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'x_axis_label_position')
|
|
184
|
-
}))
|
|
189
|
+
})), x_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
190
|
+
fontSizeKey: "x_axis_label_font_size",
|
|
191
|
+
fontColorKey: "x_axis_label_font_color",
|
|
192
|
+
fontSize: x_axis_label_font_size,
|
|
193
|
+
fontColor: x_axis_label_font_color,
|
|
194
|
+
onChange: onChange
|
|
195
|
+
}))
|
|
185
196
|
}), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(_CollapsibleSettingLayout, {
|
|
186
197
|
title: intl.get(yLabel),
|
|
187
198
|
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
@@ -204,14 +215,20 @@ const StyleSettings = _ref => {
|
|
|
204
215
|
},
|
|
205
216
|
onChange: event => setCurrYaxisTitle(event.target.value),
|
|
206
217
|
onKeyDown: onKeyDown
|
|
207
|
-
})), y_axis_show_label && /*#__PURE__*/React.createElement(
|
|
208
|
-
className: "mt-3
|
|
218
|
+
})), y_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
219
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
209
220
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
210
221
|
activeOption: yAxisLabelPosition,
|
|
211
222
|
options: yAxisLabelOptions,
|
|
212
223
|
optionsDisplay: getLabelOptionsDisplay(yAxisLabelOptions),
|
|
213
224
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'y_axis_label_position')
|
|
214
|
-
})),
|
|
225
|
+
})), y_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
226
|
+
fontSizeKey: "y_axis_label_font_size",
|
|
227
|
+
fontColorKey: "y_axis_label_font_color",
|
|
228
|
+
fontSize: y_axis_label_font_size,
|
|
229
|
+
fontColor: y_axis_label_font_color,
|
|
230
|
+
onChange: onChange
|
|
231
|
+
}), ![CHART_TYPE.BAR_CUSTOM].includes(type) && /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
215
232
|
key: "y_axis_auto_range",
|
|
216
233
|
switchClassName: "mt-3",
|
|
217
234
|
checked: y_axis_auto_range,
|
|
@@ -2,11 +2,12 @@ import _CollapsibleSettingLayout from "dtable-ui-component/lib/CollapsibleSettin
|
|
|
2
2
|
import _DTableRadioGroup from "dtable-ui-component/lib/DTableRadioGroup";
|
|
3
3
|
import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
|
|
4
4
|
import React, { useMemo, useCallback } from 'react';
|
|
5
|
-
import { Label
|
|
5
|
+
import { Label } from 'reactstrap';
|
|
6
6
|
import Divider from '../widgets/divider';
|
|
7
7
|
import MinMaxSetting from '../widgets/min-max-setting';
|
|
8
8
|
import DisplayValuesSettings from '../widgets/display-values-settings';
|
|
9
9
|
import ColorUseTypeSelector from '../widgets/color-settings';
|
|
10
|
+
import AxisTitleFontSettings from '../widgets/axis-title-font-settings';
|
|
10
11
|
import { X_LABEL_POSITIONS, Y_LABEL_POSITIONS, LABEL_POSITION_TYPE_SHOW, CHART_TYPE, SUPPORT_GOAL_LINE_CHART_TYPES } from '../../constants';
|
|
11
12
|
import intl from '../../intl';
|
|
12
13
|
import SelectLineType from '../widgets/select-line-type';
|
|
@@ -110,6 +111,10 @@ const StyleSettings = _ref => {
|
|
|
110
111
|
y_axis_max,
|
|
111
112
|
y_axis_show_value,
|
|
112
113
|
label_font_size,
|
|
114
|
+
x_axis_label_font_size,
|
|
115
|
+
x_axis_label_font_color,
|
|
116
|
+
y_axis_label_font_size,
|
|
117
|
+
y_axis_label_font_color,
|
|
113
118
|
type,
|
|
114
119
|
line_type
|
|
115
120
|
} = config;
|
|
@@ -139,14 +144,20 @@ const StyleSettings = _ref => {
|
|
|
139
144
|
checked: x_axis_show_label || false,
|
|
140
145
|
placeholder: intl.get('Display_title'),
|
|
141
146
|
onChange: () => onAxisLabelShowChange('x_axis_show_label')
|
|
142
|
-
}), x_axis_show_label && /*#__PURE__*/React.createElement(
|
|
143
|
-
className: "mt-3
|
|
147
|
+
}), x_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
144
149
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
145
150
|
activeOption: xAxisLabelPosition,
|
|
146
151
|
options: xAxisLabelOptions,
|
|
147
152
|
optionsDisplay: getLabelOptionsDisplay(xAxisLabelOptions),
|
|
148
153
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'x_axis_label_position')
|
|
149
|
-
}))
|
|
154
|
+
})), x_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
155
|
+
fontSizeKey: "x_axis_label_font_size",
|
|
156
|
+
fontColorKey: "x_axis_label_font_color",
|
|
157
|
+
fontSize: x_axis_label_font_size,
|
|
158
|
+
fontColor: x_axis_label_font_color,
|
|
159
|
+
onChange: onChange
|
|
160
|
+
}))
|
|
150
161
|
}), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(_CollapsibleSettingLayout, {
|
|
151
162
|
title: intl.get(yLabel),
|
|
152
163
|
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
@@ -154,14 +165,20 @@ const StyleSettings = _ref => {
|
|
|
154
165
|
checked: y_axis_show_label || false,
|
|
155
166
|
placeholder: intl.get('Display_title'),
|
|
156
167
|
onChange: () => onAxisLabelShowChange('y_axis_show_label')
|
|
157
|
-
}), y_axis_show_label && /*#__PURE__*/React.createElement(
|
|
158
|
-
className: "mt-3
|
|
168
|
+
}), y_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
159
170
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
160
171
|
activeOption: yAxisLabelPosition,
|
|
161
172
|
options: yAxisLabelOptions,
|
|
162
173
|
optionsDisplay: getLabelOptionsDisplay(yAxisLabelOptions),
|
|
163
174
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'y_axis_label_position')
|
|
164
|
-
})), /*#__PURE__*/React.createElement(
|
|
175
|
+
})), y_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
176
|
+
fontSizeKey: "y_axis_label_font_size",
|
|
177
|
+
fontColorKey: "y_axis_label_font_color",
|
|
178
|
+
fontSize: y_axis_label_font_size,
|
|
179
|
+
fontColor: y_axis_label_font_color,
|
|
180
|
+
onChange: onChange
|
|
181
|
+
}), /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
165
182
|
key: "y_axis_auto_range",
|
|
166
183
|
switchClassName: "mt-3",
|
|
167
184
|
checked: y_axis_auto_range,
|
|
@@ -3,13 +3,14 @@ import _CollapsibleSettingLayout from "dtable-ui-component/lib/CollapsibleSettin
|
|
|
3
3
|
import _DTableRadioGroup from "dtable-ui-component/lib/DTableRadioGroup";
|
|
4
4
|
import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
|
-
import { FormGroup, Label
|
|
6
|
+
import { FormGroup, Label } from 'reactstrap';
|
|
7
7
|
import Divider from '../widgets/divider';
|
|
8
8
|
import MinMaxSetting from '../widgets/min-max-setting';
|
|
9
9
|
import { X_LABEL_POSITIONS, Y_LABEL_POSITIONS, LABEL_POSITION_TYPE_SHOW, SUPPORT_GOAL_LINE_CHART_TYPES, COMBINATION_DISPLAY_FIELDS_LIST } from '../../constants';
|
|
10
10
|
import intl from '../../intl';
|
|
11
11
|
import SelectLineType from '../widgets/select-line-type';
|
|
12
12
|
import GoalLineSetting from '../../components/goal-line-setting';
|
|
13
|
+
import AxisTitleFontSettings from '../widgets/axis-title-font-settings';
|
|
13
14
|
import { FontSizeSettings } from '../widgets/font-settings';
|
|
14
15
|
const StyleSettings = _ref => {
|
|
15
16
|
let {
|
|
@@ -106,10 +107,16 @@ const StyleSettings = _ref => {
|
|
|
106
107
|
const {
|
|
107
108
|
x_axis_show_label,
|
|
108
109
|
x_axis_label_position,
|
|
110
|
+
x_axis_label_font_size,
|
|
111
|
+
x_axis_label_font_color,
|
|
109
112
|
show_y_axis_left_label,
|
|
110
113
|
y_axis_left_label_position,
|
|
114
|
+
y_axis_left_label_font_size,
|
|
115
|
+
y_axis_left_label_font_color,
|
|
111
116
|
y_axis_right_label_position,
|
|
112
117
|
show_y_axis_right_label,
|
|
118
|
+
y_axis_right_label_font_size,
|
|
119
|
+
y_axis_right_label_font_color,
|
|
113
120
|
y_axis_min_left,
|
|
114
121
|
y_axis_auto_range_left,
|
|
115
122
|
y_axis_max_left,
|
|
@@ -136,14 +143,20 @@ const StyleSettings = _ref => {
|
|
|
136
143
|
checked: x_axis_show_label || false,
|
|
137
144
|
placeholder: intl.get('Display_title'),
|
|
138
145
|
onChange: () => onAxisLabelShowChange('x_axis_show_label')
|
|
139
|
-
}), x_axis_show_label && /*#__PURE__*/React.createElement(
|
|
140
|
-
className: "mt-3
|
|
146
|
+
}), x_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
141
148
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
142
149
|
activeOption: xAxisLabelPosition,
|
|
143
150
|
options: xAxisLabelOptions,
|
|
144
151
|
optionsDisplay: getLabelOptionsDisplay(xAxisLabelOptions),
|
|
145
152
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'x_axis_label_position')
|
|
146
|
-
}))
|
|
153
|
+
})), x_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
154
|
+
fontSizeKey: "x_axis_label_font_size",
|
|
155
|
+
fontColorKey: "x_axis_label_font_color",
|
|
156
|
+
fontSize: x_axis_label_font_size,
|
|
157
|
+
fontColor: x_axis_label_font_color,
|
|
158
|
+
onChange: onChange
|
|
159
|
+
}))
|
|
147
160
|
}), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(_CollapsibleSettingLayout, {
|
|
148
161
|
title: intl.get('Y-axis(left side)'),
|
|
149
162
|
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
@@ -151,14 +164,20 @@ const StyleSettings = _ref => {
|
|
|
151
164
|
checked: show_y_axis_left_label || false,
|
|
152
165
|
placeholder: intl.get('Display_title'),
|
|
153
166
|
onChange: () => onAxisLabelShowChange('show_y_axis_left_label')
|
|
154
|
-
}), show_y_axis_left_label && /*#__PURE__*/React.createElement(
|
|
155
|
-
className: "mt-3
|
|
167
|
+
}), show_y_axis_left_label && /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
156
169
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
157
170
|
activeOption: yLeftAxisLabelPosition,
|
|
158
171
|
options: yAxisLabelOptions,
|
|
159
172
|
optionsDisplay: getLabelOptionsDisplay(yAxisLabelOptions),
|
|
160
173
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'y_axis_left_label_position')
|
|
161
|
-
})), /*#__PURE__*/React.createElement(
|
|
174
|
+
})), show_y_axis_left_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
175
|
+
fontSizeKey: "y_axis_left_label_font_size",
|
|
176
|
+
fontColorKey: "y_axis_left_label_font_color",
|
|
177
|
+
fontSize: y_axis_left_label_font_size,
|
|
178
|
+
fontColor: y_axis_left_label_font_color,
|
|
179
|
+
onChange: onChange
|
|
180
|
+
}), /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
162
181
|
key: "y_axis_auto_range_left",
|
|
163
182
|
switchClassName: "mt-3",
|
|
164
183
|
checked: y_axis_auto_range_left,
|
|
@@ -179,14 +198,20 @@ const StyleSettings = _ref => {
|
|
|
179
198
|
checked: show_y_axis_right_label || false,
|
|
180
199
|
placeholder: intl.get('Display_title'),
|
|
181
200
|
onChange: () => onAxisLabelShowChange('show_y_axis_right_label')
|
|
182
|
-
}), show_y_axis_right_label && /*#__PURE__*/React.createElement(
|
|
183
|
-
className: "mt-3
|
|
201
|
+
}), show_y_axis_right_label && /*#__PURE__*/React.createElement("div", {
|
|
202
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
184
203
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
185
204
|
activeOption: yRightAxisLabelPosition,
|
|
186
205
|
options: yAxisLabelOptions,
|
|
187
206
|
optionsDisplay: getLabelOptionsDisplay(yAxisLabelOptions),
|
|
188
207
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'y_axis_right_label_position')
|
|
189
|
-
})), /*#__PURE__*/React.createElement(
|
|
208
|
+
})), show_y_axis_right_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
209
|
+
fontSizeKey: "y_axis_right_label_font_size",
|
|
210
|
+
fontColorKey: "y_axis_right_label_font_color",
|
|
211
|
+
fontSize: y_axis_right_label_font_size,
|
|
212
|
+
fontColor: y_axis_right_label_font_color,
|
|
213
|
+
onChange: onChange
|
|
214
|
+
}), /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
190
215
|
key: "y_axis_auto_range_right",
|
|
191
216
|
switchClassName: "mt-3",
|
|
192
217
|
checked: y_axis_auto_range_right,
|
|
@@ -2,12 +2,13 @@ import _CollapsibleSettingLayout from "dtable-ui-component/lib/CollapsibleSettin
|
|
|
2
2
|
import _DTableRadioGroup from "dtable-ui-component/lib/DTableRadioGroup";
|
|
3
3
|
import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
|
-
import { Label
|
|
5
|
+
import { Label } from 'reactstrap';
|
|
6
6
|
import Divider from '../widgets/divider';
|
|
7
7
|
import MinMaxSetting from '../widgets/min-max-setting';
|
|
8
8
|
import DisplayValuesSettings from '../widgets/display-values-settings';
|
|
9
9
|
import { eventStopPropagation } from '../../utils';
|
|
10
10
|
import { X_LABEL_POSITIONS, Y_LABEL_POSITIONS, LABEL_POSITION_TYPE_SHOW, LABEL_COLORS } from '../../constants';
|
|
11
|
+
import AxisTitleFontSettings from '../widgets/axis-title-font-settings';
|
|
11
12
|
import intl from '../../intl';
|
|
12
13
|
const StyleSettings = _ref => {
|
|
13
14
|
let {
|
|
@@ -116,8 +117,12 @@ const StyleSettings = _ref => {
|
|
|
116
117
|
const {
|
|
117
118
|
x_axis_show_label,
|
|
118
119
|
x_axis_label_position,
|
|
120
|
+
x_axis_label_font_size,
|
|
121
|
+
x_axis_label_font_color,
|
|
119
122
|
y_axis_show_label,
|
|
120
123
|
y_axis_label_position,
|
|
124
|
+
y_axis_label_font_size,
|
|
125
|
+
y_axis_label_font_color,
|
|
121
126
|
y_axis_auto_range = true,
|
|
122
127
|
y_axis_min,
|
|
123
128
|
y_axis_max,
|
|
@@ -136,14 +141,20 @@ const StyleSettings = _ref => {
|
|
|
136
141
|
checked: x_axis_show_label || false,
|
|
137
142
|
placeholder: intl.get('Display_title'),
|
|
138
143
|
onChange: () => onAxisLabelShowChange('x_axis_show_label')
|
|
139
|
-
}), x_axis_show_label && /*#__PURE__*/React.createElement(
|
|
140
|
-
className: "mt-3
|
|
144
|
+
}), x_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
141
146
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
142
147
|
activeOption: xAxisLabelPosition,
|
|
143
148
|
options: xAxisLabelOptions,
|
|
144
149
|
optionsDisplay: getLabelOptionsDisplay(xAxisLabelOptions),
|
|
145
150
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'x_axis_label_position')
|
|
146
|
-
}))
|
|
151
|
+
})), x_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
152
|
+
fontSizeKey: "x_axis_label_font_size",
|
|
153
|
+
fontColorKey: "x_axis_label_font_color",
|
|
154
|
+
fontSize: x_axis_label_font_size,
|
|
155
|
+
fontColor: x_axis_label_font_color,
|
|
156
|
+
onChange: onChange
|
|
157
|
+
}))
|
|
147
158
|
}), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(_CollapsibleSettingLayout, {
|
|
148
159
|
title: intl.get('Y_axis'),
|
|
149
160
|
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
@@ -151,14 +162,20 @@ const StyleSettings = _ref => {
|
|
|
151
162
|
checked: y_axis_show_label || false,
|
|
152
163
|
placeholder: intl.get('Display_title'),
|
|
153
164
|
onChange: () => onAxisLabelShowChange('y_axis_show_label')
|
|
154
|
-
}), y_axis_show_label && /*#__PURE__*/React.createElement(
|
|
155
|
-
className: "mt-3
|
|
165
|
+
}), y_axis_show_label && /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "mt-3 settings-text-horizontal-align sea-chart-select-group"
|
|
156
167
|
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Alignment')), /*#__PURE__*/React.createElement(_DTableRadioGroup, {
|
|
157
168
|
activeOption: yAxisLabelPosition,
|
|
158
169
|
options: yAxisLabelOptions,
|
|
159
170
|
optionsDisplay: getLabelOptionsDisplay(yAxisLabelOptions),
|
|
160
171
|
onSelectChanged: position => onAxisLabelPositionChange(position, 'y_axis_label_position')
|
|
161
|
-
})), /*#__PURE__*/React.createElement(
|
|
172
|
+
})), y_axis_show_label && /*#__PURE__*/React.createElement(AxisTitleFontSettings, {
|
|
173
|
+
fontSizeKey: "y_axis_label_font_size",
|
|
174
|
+
fontColorKey: "y_axis_label_font_color",
|
|
175
|
+
fontSize: y_axis_label_font_size,
|
|
176
|
+
fontColor: y_axis_label_font_color,
|
|
177
|
+
onChange: onChange
|
|
178
|
+
}), /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
162
179
|
key: "y_axis_auto_range",
|
|
163
180
|
switchClassName: "mt-3",
|
|
164
181
|
checked: y_axis_auto_range,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { DEFAULT_AXIS_LABEL_FONT_COLOR, DEFAULT_AXIS_LABEL_FONT_SIZE } from '../../../constants';
|
|
3
|
+
import { FontSizeSettings, FontColorSettings } from '../font-settings';
|
|
4
|
+
const AxisTitleFontSettings = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
fontSizeKey,
|
|
7
|
+
fontColorKey,
|
|
8
|
+
fontSize,
|
|
9
|
+
fontColor,
|
|
10
|
+
fontSizeTitle,
|
|
11
|
+
fontColorTitle,
|
|
12
|
+
defaultFontColor,
|
|
13
|
+
onChange
|
|
14
|
+
} = _ref;
|
|
15
|
+
const onFontSizeChange = useCallback(size => {
|
|
16
|
+
onChange && onChange({
|
|
17
|
+
[fontSizeKey]: size
|
|
18
|
+
});
|
|
19
|
+
}, [fontSizeKey, onChange]);
|
|
20
|
+
const onFontColorChange = useCallback(color => {
|
|
21
|
+
onChange && onChange({
|
|
22
|
+
[fontColorKey]: color
|
|
23
|
+
});
|
|
24
|
+
}, [fontColorKey, onChange]);
|
|
25
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FontSizeSettings, {
|
|
26
|
+
className: "mt-3 mb-3",
|
|
27
|
+
fontSize: fontSize,
|
|
28
|
+
defaultFontSize: DEFAULT_AXIS_LABEL_FONT_SIZE,
|
|
29
|
+
modifyFontSize: onFontSizeChange,
|
|
30
|
+
title: fontSizeTitle
|
|
31
|
+
}), /*#__PURE__*/React.createElement(FontColorSettings, {
|
|
32
|
+
className: "mb-3",
|
|
33
|
+
fontColor: fontColor,
|
|
34
|
+
defaultFontColor: defaultFontColor || DEFAULT_AXIS_LABEL_FONT_COLOR,
|
|
35
|
+
modifyFontColor: onFontColorChange,
|
|
36
|
+
title: fontColorTitle
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
export default AxisTitleFontSettings;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import { CellType, COLLABORATOR_COLUMN_TYPES, FORMULA_RESULT_TYPE, getCollaboratorsName, getFormulaDisplayString, FORMULA_COLUMN_TYPES_MAP, getCellValueDisplayString } from 'dtable-utils';
|
|
2
|
+
import { CellType, COLLABORATOR_COLUMN_TYPES, FORMULA_RESULT_TYPE, getCollaboratorsName, getFormulaDisplayString, FORMULA_COLUMN_TYPES_MAP, getCellValueDisplayString, isEmpty } from 'dtable-utils';
|
|
3
3
|
export const getClientFormulaDisplayString = function (value, columnData) {
|
|
4
4
|
let {
|
|
5
5
|
collaborators = []
|
|
6
6
|
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7
|
-
if (!columnData ||
|
|
7
|
+
if (!columnData || isEmpty(value)) return '';
|
|
8
8
|
const {
|
|
9
9
|
result_type,
|
|
10
10
|
array_type
|