@easyv/config 1.1.9 → 1.1.11

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.
Files changed (59) hide show
  1. package/.babelrc +9 -9
  2. package/CHANGELOG.md +17 -17
  3. package/index.js +3 -3
  4. package/lib/animation.js +37 -51
  5. package/lib/axes.js +31 -47
  6. package/lib/axisLine.js +6 -9
  7. package/lib/baseLine.js +31 -40
  8. package/lib/brush.js +12 -15
  9. package/lib/dimension.js +8 -11
  10. package/lib/extent.js +4 -7
  11. package/lib/font.js +12 -15
  12. package/lib/gridLine.js +8 -11
  13. package/lib/imageGroup.js +48 -0
  14. package/lib/index.js +95 -117
  15. package/lib/interaction.js +4 -9
  16. package/lib/label.js +103 -124
  17. package/lib/legend.js +165 -184
  18. package/lib/mapping.js +4 -7
  19. package/lib/margin.js +8 -11
  20. package/lib/multiColor.js +10 -13
  21. package/lib/mutiColor.js +51 -51
  22. package/lib/pie.js +163 -221
  23. package/lib/sc.js +4 -7
  24. package/lib/series.js +174 -163
  25. package/lib/shadow.js +8 -11
  26. package/lib/show.js +0 -4
  27. package/lib/textOverflow.js +4 -7
  28. package/lib/tickLine.js +8 -11
  29. package/lib/tooltip.js +68 -65
  30. package/lib/translate.js +0 -2
  31. package/lib/unit.js +21 -30
  32. package/package.json +30 -30
  33. package/src/animation.js +256 -256
  34. package/src/axes.js +162 -162
  35. package/src/axisLine.js +39 -39
  36. package/src/baseLine.js +216 -216
  37. package/src/brush.js +90 -90
  38. package/src/dimension.js +49 -49
  39. package/src/extent.js +29 -29
  40. package/src/font.js +23 -23
  41. package/src/gridLine.js +49 -49
  42. package/src/imageGroup.js +37 -0
  43. package/src/index.js +101 -99
  44. package/src/interaction.js +121 -121
  45. package/src/label.js +722 -722
  46. package/src/legend.js +982 -982
  47. package/src/mapping.js +26 -26
  48. package/src/margin.js +58 -58
  49. package/src/multiColor.js +30 -30
  50. package/src/pie.js +1035 -1035
  51. package/src/sc.js +11 -8
  52. package/src/series.js +867 -824
  53. package/src/shadow.js +17 -17
  54. package/src/show.js +11 -11
  55. package/src/textOverflow.js +34 -34
  56. package/src/tickLine.js +51 -51
  57. package/src/tooltip.js +433 -425
  58. package/src/translate.js +27 -27
  59. package/src/unit.js +67 -67
package/src/dimension.js CHANGED
@@ -1,49 +1,49 @@
1
- const defaultDimension = {
2
- width: 450,
3
- height: 250,
4
- left: 100,
5
- top: 100,
6
- };
7
- export default ({
8
- width = defaultDimension.width,
9
- height = defaultDimension.height,
10
- left = defaultDimension.left,
11
- top = defaultDimension.top,
12
- } = defaultDimension) => ({
13
- name: 'dimension',
14
- displayName: '位置尺寸',
15
- value: [
16
- {
17
- name: 'chartPosition',
18
- displayName: '图表位置',
19
- value: [
20
- {
21
- name: 'left',
22
- displayName: 'X轴坐标',
23
- value: left,
24
- },
25
- {
26
- name: 'top',
27
- displayName: 'Y轴坐标',
28
- value: top,
29
- },
30
- ],
31
- },
32
- {
33
- name: 'chartDimension',
34
- displayName: '图表尺寸',
35
- value: [
36
- {
37
- name: 'width',
38
- displayName: '宽度',
39
- value: width,
40
- },
41
- {
42
- name: 'height',
43
- displayName: '高度',
44
- value: height,
45
- },
46
- ],
47
- },
48
- ],
49
- });
1
+ const defaultDimension = {
2
+ width: 450,
3
+ height: 250,
4
+ left: 100,
5
+ top: 100,
6
+ };
7
+ export default ({
8
+ width = defaultDimension.width,
9
+ height = defaultDimension.height,
10
+ left = defaultDimension.left,
11
+ top = defaultDimension.top,
12
+ } = defaultDimension) => ({
13
+ name: 'dimension',
14
+ displayName: '位置尺寸',
15
+ value: [
16
+ {
17
+ name: 'chartPosition',
18
+ displayName: '图表位置',
19
+ value: [
20
+ {
21
+ name: 'left',
22
+ displayName: 'X轴坐标',
23
+ value: left,
24
+ },
25
+ {
26
+ name: 'top',
27
+ displayName: 'Y轴坐标',
28
+ value: top,
29
+ },
30
+ ],
31
+ },
32
+ {
33
+ name: 'chartDimension',
34
+ displayName: '图表尺寸',
35
+ value: [
36
+ {
37
+ name: 'width',
38
+ displayName: '宽度',
39
+ value: width,
40
+ },
41
+ {
42
+ name: 'height',
43
+ displayName: '高度',
44
+ value: height,
45
+ },
46
+ ],
47
+ },
48
+ ],
49
+ });
package/src/extent.js CHANGED
@@ -1,29 +1,29 @@
1
- const extent = {
2
- min: '0',
3
- max: '',
4
- };
5
- export default ({ min = extent.min, max = extent.max } = extent) => ({
6
- name: 'extent',
7
- displayName: '数值范围',
8
- value: [
9
- {
10
- name: 'min',
11
- displayName: '最小值',
12
- value: min,
13
- type: 'input',
14
- config: {
15
- span: 12,
16
- },
17
- },
18
- {
19
- name: 'max',
20
- displayName: '最大值',
21
- value: max,
22
- type: 'input',
23
- config: {
24
- span: 12,
25
- },
26
- },
27
- ],
28
- type: 'group',
29
- });
1
+ const extent = {
2
+ min: '0',
3
+ max: '',
4
+ };
5
+ export default ({ min = extent.min, max = extent.max } = extent) => ({
6
+ name: 'extent',
7
+ displayName: '数值范围',
8
+ value: [
9
+ {
10
+ name: 'min',
11
+ displayName: '最小值',
12
+ value: min,
13
+ type: 'input',
14
+ config: {
15
+ span: 12,
16
+ },
17
+ },
18
+ {
19
+ name: 'max',
20
+ displayName: '最大值',
21
+ value: max,
22
+ type: 'input',
23
+ config: {
24
+ span: 12,
25
+ },
26
+ },
27
+ ],
28
+ type: 'group',
29
+ });
package/src/font.js CHANGED
@@ -1,23 +1,23 @@
1
- const defaultFont = {
2
- fontFamily: 'Mircosoft Yahei',
3
- fontSize: 12,
4
- color: 'rgba(230,247,255,0.7)',
5
- bold: false,
6
- italic: false,
7
- letterSpacing: 0,
8
- };
9
- export default ({
10
- fontFamily = defaultFont.fontFamily,
11
- fontSize = defaultFont.fontSize,
12
- color = defaultFont.color,
13
- bold = defaultFont.bold,
14
- italic = defaultFont.italic,
15
- letterSpacing = defaultFont.letterSpacing,
16
- } = defaultFont) => ({
17
- fontFamily,
18
- fontSize,
19
- color,
20
- bold,
21
- italic,
22
- letterSpacing,
23
- });
1
+ const defaultFont = {
2
+ fontFamily: 'Mircosoft Yahei',
3
+ fontSize: 12,
4
+ color: 'rgba(230,247,255,0.7)',
5
+ bold: false,
6
+ italic: false,
7
+ letterSpacing: 0,
8
+ };
9
+ export default ({
10
+ fontFamily = defaultFont.fontFamily,
11
+ fontSize = defaultFont.fontSize,
12
+ color = defaultFont.color,
13
+ bold = defaultFont.bold,
14
+ italic = defaultFont.italic,
15
+ letterSpacing = defaultFont.letterSpacing,
16
+ } = defaultFont) => ({
17
+ fontFamily,
18
+ fontSize,
19
+ color,
20
+ bold,
21
+ italic,
22
+ letterSpacing,
23
+ });
package/src/gridLine.js CHANGED
@@ -1,49 +1,49 @@
1
- const gridLine = {
2
- show: false,
3
- strokeDasharray: '3,3',
4
- color: 'rgba(230, 247, 255, 0.2)',
5
- lineWidth: 1,
6
- };
7
- export default ({
8
- show = gridLine.show,
9
- strokeDasharray = gridLine.strokeDasharray,
10
- color = gridLine.color,
11
- lineWidth = gridLine.lineWidth,
12
- } = gridLine) => ({
13
- name: 'gridLine',
14
- displayName: '网格线',
15
- value: [
16
- {
17
- name: 'show',
18
- displayName: '显示',
19
- value: show,
20
- type: 'boolean',
21
- },
22
- {
23
- rule: [['show', '$eq', true]],
24
- name: 'strokeDasharray',
25
- displayName: '虚线样式',
26
- value: strokeDasharray,
27
- type: 'input',
28
- tip: '格式使用半角字符,如2,2',
29
- },
30
- {
31
- rule: [['show', '$eq', true]],
32
- name: 'color',
33
- displayName: '颜色',
34
- value: color,
35
- type: 'color',
36
- markColorType: 'gridColor',
37
- },
38
- {
39
- rule: [['show', '$eq', true]],
40
- name: 'lineWidth',
41
- displayName: '粗细',
42
- value: lineWidth,
43
- type: 'number',
44
- config: {
45
- suffix: 'px',
46
- },
47
- },
48
- ],
49
- });
1
+ const gridLine = {
2
+ show: false,
3
+ strokeDasharray: '3,3',
4
+ color: 'rgba(230, 247, 255, 0.2)',
5
+ lineWidth: 1,
6
+ };
7
+ export default ({
8
+ show = gridLine.show,
9
+ strokeDasharray = gridLine.strokeDasharray,
10
+ color = gridLine.color,
11
+ lineWidth = gridLine.lineWidth,
12
+ } = gridLine) => ({
13
+ name: 'gridLine',
14
+ displayName: '网格线',
15
+ value: [
16
+ {
17
+ name: 'show',
18
+ displayName: '显示',
19
+ value: show,
20
+ type: 'boolean',
21
+ },
22
+ {
23
+ rule: [['show', '$eq', true]],
24
+ name: 'strokeDasharray',
25
+ displayName: '虚线样式',
26
+ value: strokeDasharray,
27
+ type: 'input',
28
+ tip: '格式使用半角字符,如2,2',
29
+ },
30
+ {
31
+ rule: [['show', '$eq', true]],
32
+ name: 'color',
33
+ displayName: '颜色',
34
+ value: color,
35
+ type: 'color',
36
+ markColorType: 'gridColor',
37
+ },
38
+ {
39
+ rule: [['show', '$eq', true]],
40
+ name: 'lineWidth',
41
+ displayName: '粗细',
42
+ value: lineWidth,
43
+ type: 'number',
44
+ config: {
45
+ suffix: 'px',
46
+ },
47
+ },
48
+ ],
49
+ });
@@ -0,0 +1,37 @@
1
+ import { sc, translate, show } from '.';
2
+
3
+ const defaultImageGroup={
4
+ show:true,
5
+ url:"",
6
+ size:{
7
+ width:20,
8
+ height:20
9
+ },
10
+ translate:{
11
+ x:0,
12
+ y:0
13
+ }
14
+ }
15
+
16
+ export const imageGroup=(name="imageGroup", displayName="图片组", {
17
+ show:show_=defaultImageGroup.show,
18
+ url=defaultImageGroup.url,
19
+ size:{
20
+ width=defaultImageGroup.size.width,
21
+ height=defaultImageGroup.size.height
22
+ } = defaultImageGroup.size,
23
+ translate:{
24
+ x=defaultImageGroup.translate.x,
25
+ y=defaultImageGroup.translate.y
26
+ } = defaultImageGroup.translate
27
+ } = defaultImageGroup)=>{
28
+ return sc(name,displayName,'',[
29
+ show(show_),
30
+ sc("url","图片","image",url),
31
+ sc("size","尺寸","group",[
32
+ sc("width","宽","number",width,{span:12,suffix:"px"}),
33
+ sc("height","高","number",height,{span:12,suffix:"px"})
34
+ ]),
35
+ translate(x,y)
36
+ ])
37
+ }
package/src/index.js CHANGED
@@ -1,99 +1,101 @@
1
- import show, { showRule } from './show';
2
- import font from './font';
3
- import translate 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 {
28
- bandSeries,
29
- lineSeries,
30
- areaSeries,
31
- pieSeries,
32
- purePieSeries,
33
- } from './series';
34
- import pie, {
35
- rosePie,
36
- rosePieDecorate,
37
- donut,
38
- carouselDonut,
39
- nestRosePie,
40
- carouselDonut2,
41
- current as pieCurrent,
42
- } from './pie';
43
- import brush from './brush';
44
- import interaction from './interaction';
45
- import sc from './sc';
46
- import shadow from './shadow';
47
- import textOverflow from './textOverflow';
48
- import baseLine from './baseLine';
49
- export {
50
- show,
51
- showRule,
52
- font,
53
- tooltip,
54
- translate,
55
- textOverflow,
56
- extent,
57
- unit,
58
- margin,
59
- multiColor,
60
- animation,
61
- dataAnimation,
62
- animationOfPie,
63
- animationOfCarousel,
64
- dimension,
65
- gridLine,
66
- tickLine,
67
- axisLine,
68
- valueAxis,
69
- categoryAxis,
70
- axes,
71
- mapping,
72
- bandSeries,
73
- lineSeries,
74
- areaSeries,
75
- pieSeries,
76
- purePieSeries,
77
- brush,
78
- interaction,
79
- legend,
80
- legendOfPie,
81
- legendOfRose,
82
- legendOfDoublePie,
83
- label,
84
- labelOfPie,
85
- labelOfRose,
86
- axisLabel,
87
- valueAsixLabel,
88
- pie,
89
- rosePie,
90
- nestRosePie,
91
- rosePieDecorate,
92
- donut,
93
- carouselDonut,
94
- carouselDonut2,
95
- pieCurrent,
96
- sc,
97
- shadow,
98
- baseLine
99
- };
1
+ import show, { showRule } from './show';
2
+ import font from './font';
3
+ import translate 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
+ export {
51
+ show,
52
+ showRule,
53
+ font,
54
+ tooltip,
55
+ translate,
56
+ textOverflow,
57
+ extent,
58
+ unit,
59
+ margin,
60
+ multiColor,
61
+ animation,
62
+ dataAnimation,
63
+ animationOfPie,
64
+ animationOfCarousel,
65
+ dimension,
66
+ gridLine,
67
+ tickLine,
68
+ axisLine,
69
+ valueAxis,
70
+ categoryAxis,
71
+ axes,
72
+ imageGroup,
73
+ mapping,
74
+ bandSeries,
75
+ lineSeries,
76
+ areaSeries,
77
+ pieSeries,
78
+ purePieSeries,
79
+ brush,
80
+ interaction,
81
+ legend,
82
+ legendOfPie,
83
+ legendOfRose,
84
+ legendOfDoublePie,
85
+ label,
86
+ labelOfPie,
87
+ labelOfRose,
88
+ axisLabel,
89
+ valueAsixLabel,
90
+ pie,
91
+ rosePie,
92
+ nestRosePie,
93
+ rosePieDecorate,
94
+ donut,
95
+ carouselDonut,
96
+ carouselDonut2,
97
+ pieCurrent,
98
+ sc,
99
+ shadow,
100
+ baseLine
101
+ };