@easyv/config 1.2.8 → 1.2.10

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/src/index.js CHANGED
@@ -1,106 +1,106 @@
1
- import show, { showRule } from './show';
2
- import font from './font';
3
- import translate, { translate3d } from './translate';
4
- import gridLine from './gridLine';
5
- import tickLine from './tickLine';
6
- import axisLine from './axisLine';
7
- import extent from './extent';
8
- import unit from './unit';
9
- import margin from './margin';
10
- import multiColor from './multiColor';
11
- import animation, {
12
- dataAnimation,
13
- animationOfPie,
14
- animationOfCarousel,
15
- } from './animation';
16
- import dimension from './dimension';
17
- import label, {
18
- labelOfPie,
19
- labelOfRose,
20
- axisLabel,
21
- valueAsixLabel,
22
- } from './label';
23
- import legend, { legendOfPie, legendOfRose, legendOfDoublePie } from './legend';
24
- import tooltip from './tooltip';
25
- import axes, { valueAxis, categoryAxis } from './axes';
26
- import mapping from './mapping';
27
- import { imageGroup } from './imageGroup';
28
- import {
29
- bandSeries,
30
- lineSeries,
31
- areaSeries,
32
- pieSeries,
33
- purePieSeries,
34
- } from './series';
35
- import pie, {
36
- rosePie,
37
- rosePieDecorate,
38
- donut,
39
- carouselDonut,
40
- nestRosePie,
41
- carouselDonut2,
42
- current as pieCurrent,
43
- } from './pie';
44
- import brush from './brush';
45
- import interaction from './interaction';
46
- import sc from './sc';
47
- import shadow from './shadow';
48
- import textOverflow from './textOverflow';
49
- import baseLine from './baseLine';
50
- import { control } from './control';
51
- import pieTooltip from './pieTooltip';
52
- export {
53
- pieTooltip,
54
- control,
55
- show,
56
- showRule,
57
- font,
58
- tooltip,
59
- translate,
60
- translate3d,
61
- textOverflow,
62
- extent,
63
- unit,
64
- margin,
65
- multiColor,
66
- animation,
67
- dataAnimation,
68
- animationOfPie,
69
- animationOfCarousel,
70
- dimension,
71
- gridLine,
72
- tickLine,
73
- axisLine,
74
- valueAxis,
75
- categoryAxis,
76
- axes,
77
- imageGroup,
78
- mapping,
79
- bandSeries,
80
- lineSeries,
81
- areaSeries,
82
- pieSeries,
83
- purePieSeries,
84
- brush,
85
- interaction,
86
- legend,
87
- legendOfPie,
88
- legendOfRose,
89
- legendOfDoublePie,
90
- label,
91
- labelOfPie,
92
- labelOfRose,
93
- axisLabel,
94
- valueAsixLabel,
95
- pie,
96
- rosePie,
97
- nestRosePie,
98
- rosePieDecorate,
99
- donut,
100
- carouselDonut,
101
- carouselDonut2,
102
- pieCurrent,
103
- sc,
104
- shadow,
105
- baseLine
106
- };
1
+ import show, { showRule } from './show';
2
+ import font from './font';
3
+ import translate, { translate3d } from './translate';
4
+ import gridLine from './gridLine';
5
+ import tickLine from './tickLine';
6
+ import axisLine from './axisLine';
7
+ import extent from './extent';
8
+ import unit from './unit';
9
+ import margin from './margin';
10
+ import multiColor from './multiColor';
11
+ import animation, {
12
+ dataAnimation,
13
+ animationOfPie,
14
+ animationOfCarousel,
15
+ } from './animation';
16
+ import dimension from './dimension';
17
+ import label, {
18
+ labelOfPie,
19
+ labelOfRose,
20
+ axisLabel,
21
+ valueAsixLabel,
22
+ } from './label';
23
+ import legend, { legendOfPie, legendOfRose, legendOfDoublePie } from './legend';
24
+ import tooltip from './tooltip';
25
+ import axes, { valueAxis, categoryAxis } from './axes';
26
+ import mapping from './mapping';
27
+ import { imageGroup } from './imageGroup';
28
+ import {
29
+ bandSeries,
30
+ lineSeries,
31
+ areaSeries,
32
+ pieSeries,
33
+ purePieSeries,
34
+ } from './series';
35
+ import pie, {
36
+ rosePie,
37
+ rosePieDecorate,
38
+ donut,
39
+ carouselDonut,
40
+ nestRosePie,
41
+ carouselDonut2,
42
+ current as pieCurrent,
43
+ } from './pie';
44
+ import brush from './brush';
45
+ import interaction from './interaction';
46
+ import sc from './sc';
47
+ import shadow from './shadow';
48
+ import textOverflow from './textOverflow';
49
+ import baseLine from './baseLine';
50
+ import { control } from './control';
51
+ import pieTooltip from './pieTooltip';
52
+ export {
53
+ pieTooltip,
54
+ control,
55
+ show,
56
+ showRule,
57
+ font,
58
+ tooltip,
59
+ translate,
60
+ translate3d,
61
+ textOverflow,
62
+ extent,
63
+ unit,
64
+ margin,
65
+ multiColor,
66
+ animation,
67
+ dataAnimation,
68
+ animationOfPie,
69
+ animationOfCarousel,
70
+ dimension,
71
+ gridLine,
72
+ tickLine,
73
+ axisLine,
74
+ valueAxis,
75
+ categoryAxis,
76
+ axes,
77
+ imageGroup,
78
+ mapping,
79
+ bandSeries,
80
+ lineSeries,
81
+ areaSeries,
82
+ pieSeries,
83
+ purePieSeries,
84
+ brush,
85
+ interaction,
86
+ legend,
87
+ legendOfPie,
88
+ legendOfRose,
89
+ legendOfDoublePie,
90
+ label,
91
+ labelOfPie,
92
+ labelOfRose,
93
+ axisLabel,
94
+ valueAsixLabel,
95
+ pie,
96
+ rosePie,
97
+ nestRosePie,
98
+ rosePieDecorate,
99
+ donut,
100
+ carouselDonut,
101
+ carouselDonut2,
102
+ pieCurrent,
103
+ sc,
104
+ shadow,
105
+ baseLine
106
+ };
@@ -1,121 +1,121 @@
1
- /**
2
- * TODO:有个触发回调的类型
3
- */
4
- const defaultAction = 'click';
5
- const defaultCallback = {
6
- actions: [{ name: '鼠标点击', value: defaultAction }],
7
- extraInput: [],
8
- };
9
-
10
- export default ({ callback, remoteControl }) => ({
11
- name: 'interaction',
12
- displayName: '交互',
13
- value:
14
- callback || remoteControl
15
- ? [
16
- callback &&
17
- Array.isArray(callback.callback) && {
18
- name: 'callback',
19
- displayName: '回调参数',
20
- type: 'array',
21
- value: callback.callback.map(({ origin, target }, index) => ({
22
- name: 'callback_' + index,
23
- displayName: '回调',
24
- type: 'object',
25
- value: [
26
- {
27
- name: 'actions',
28
- displayName: '匹配动作',
29
- type: 'select',
30
- value: callback.value || defaultAction,
31
- config: {
32
- options: callback.actions
33
- ? callback.actions
34
- : defaultCallback.actions,
35
- },
36
- },
37
- {
38
- name: 'origin',
39
- displayName: '字段值',
40
- type: 'input',
41
- value: origin,
42
- },
43
- {
44
- name: 'target',
45
- displayName: '变量名',
46
- type: 'input',
47
- value: target,
48
- },
49
- ...(callback.extraInput
50
- ? callback.extraInput
51
- : defaultCallback.extraInput),
52
- ],
53
- })),
54
- config: {
55
- template: [
56
- {
57
- name: 'callback',
58
- displayName: '回调',
59
- type: 'object',
60
- value: [
61
- {
62
- name: 'actions',
63
- displayName: '匹配动作',
64
- type: 'select',
65
- value: callback.value || defaultAction,
66
- config: {
67
- options: callback.actions
68
- ? callback.actions
69
- : defaultCallback.actions,
70
- },
71
- },
72
- {
73
- name: 'origin',
74
- displayName: '字段值',
75
- type: 'input',
76
- value: '',
77
- },
78
- {
79
- name: 'target',
80
- displayName: '变量名',
81
- type: 'input',
82
- value: '',
83
- config:{
84
- callback:true
85
- }
86
- },
87
- ...(callback.extraInput
88
- ? callback.extraInput
89
- : defaultCallback.extraInput),
90
- ],
91
- },
92
- ],
93
- },
94
- },
95
- remoteControl &&
96
- Array.isArray(remoteControl) && {
97
- name: 'remoteControl',
98
- displayName: '远程控制',
99
- type: 'array',
100
- value: [],
101
- config: {
102
- template: [
103
- {
104
- name: 'controls',
105
- displayName: '控制',
106
- type: 'object',
107
- value: [
108
- {
109
- name: 'control',
110
- displayName: '控制',
111
- type: 'remoteOptions',
112
- value: '{}',
113
- },
114
- ],
115
- },
116
- ],
117
- },
118
- },
119
- ].filter((item) => !!item)
120
- : [],
121
- });
1
+ /**
2
+ * TODO:有个触发回调的类型
3
+ */
4
+ const defaultAction = 'click';
5
+ const defaultCallback = {
6
+ actions: [{ name: '鼠标点击', value: defaultAction }],
7
+ extraInput: [],
8
+ };
9
+
10
+ export default ({ callback, remoteControl }) => ({
11
+ name: 'interaction',
12
+ displayName: '交互',
13
+ value:
14
+ callback || remoteControl
15
+ ? [
16
+ callback &&
17
+ Array.isArray(callback.callback) && {
18
+ name: 'callback',
19
+ displayName: '回调参数',
20
+ type: 'array',
21
+ value: callback.callback.map(({ origin, target }, index) => ({
22
+ name: 'callback_' + index,
23
+ displayName: '回调',
24
+ type: 'object',
25
+ value: [
26
+ {
27
+ name: 'actions',
28
+ displayName: '匹配动作',
29
+ type: 'select',
30
+ value: callback.value || defaultAction,
31
+ config: {
32
+ options: callback.actions
33
+ ? callback.actions
34
+ : defaultCallback.actions,
35
+ },
36
+ },
37
+ {
38
+ name: 'origin',
39
+ displayName: '字段值',
40
+ type: 'input',
41
+ value: origin,
42
+ },
43
+ {
44
+ name: 'target',
45
+ displayName: '变量名',
46
+ type: 'input',
47
+ value: target,
48
+ },
49
+ ...(callback.extraInput
50
+ ? callback.extraInput
51
+ : defaultCallback.extraInput),
52
+ ],
53
+ })),
54
+ config: {
55
+ template: [
56
+ {
57
+ name: 'callback',
58
+ displayName: '回调',
59
+ type: 'object',
60
+ value: [
61
+ {
62
+ name: 'actions',
63
+ displayName: '匹配动作',
64
+ type: 'select',
65
+ value: callback.value || defaultAction,
66
+ config: {
67
+ options: callback.actions
68
+ ? callback.actions
69
+ : defaultCallback.actions,
70
+ },
71
+ },
72
+ {
73
+ name: 'origin',
74
+ displayName: '字段值',
75
+ type: 'input',
76
+ value: '',
77
+ },
78
+ {
79
+ name: 'target',
80
+ displayName: '变量名',
81
+ type: 'input',
82
+ value: '',
83
+ config:{
84
+ callback:true
85
+ }
86
+ },
87
+ ...(callback.extraInput
88
+ ? callback.extraInput
89
+ : defaultCallback.extraInput),
90
+ ],
91
+ },
92
+ ],
93
+ },
94
+ },
95
+ remoteControl &&
96
+ Array.isArray(remoteControl) && {
97
+ name: 'remoteControl',
98
+ displayName: '远程控制',
99
+ type: 'array',
100
+ value: [],
101
+ config: {
102
+ template: [
103
+ {
104
+ name: 'controls',
105
+ displayName: '控制',
106
+ type: 'object',
107
+ value: [
108
+ {
109
+ name: 'control',
110
+ displayName: '控制',
111
+ type: 'remoteOptions',
112
+ value: '{}',
113
+ },
114
+ ],
115
+ },
116
+ ],
117
+ },
118
+ },
119
+ ].filter((item) => !!item)
120
+ : [],
121
+ });
package/src/label.js CHANGED
@@ -655,7 +655,7 @@ export const axisLabel = ({
655
655
  displayName: "显示最新",
656
656
  value: showLast,
657
657
  type: "boolean",
658
- tip: "显示返回最新数据的轴标签",
658
+ tip: "开启后会必定展示首尾日期的数据,但可能会导致标签数量和预期不一致",
659
659
  },
660
660
  sc(
661
661
  "autoSort",
@@ -705,7 +705,7 @@ const defaultValueAxisLabel = {
705
705
  percentageExtent: { min: 80, max: 120 },
706
706
  auto: false,
707
707
  mode: "count",
708
- numericalRangeModel: "percentage",
708
+ numericalRangeModel: "value",
709
709
  count: 3,
710
710
  step: 100,
711
711
  decimal: 0,