1 | import { getColorsWithSubjectColor } from './util/color';
|
2 | var subjectColor = 'rgb(95, 149, 255)';
|
3 | var backColor = 'rgb(255, 255, 255)';
|
4 | var textColor = 'rgb(0, 0, 0)';
|
5 | var colorSet = getColorsWithSubjectColor(subjectColor, backColor);
|
6 | export default {
|
7 | version: '0.5.1',
|
8 | rootContainerClassName: 'root-container',
|
9 | nodeContainerClassName: 'node-container',
|
10 | edgeContainerClassName: 'edge-container',
|
11 | comboContainerClassName: 'combo-container',
|
12 | delegateContainerClassName: 'delegate-container',
|
13 | defaultLoopPosition: 'top',
|
14 | nodeLabel: {
|
15 | style: {
|
16 | fill: '#000',
|
17 | fontSize: 12,
|
18 | textAlign: 'center',
|
19 | textBaseline: 'middle'
|
20 | },
|
21 | offset: 4
|
22 |
|
23 | },
|
24 | defaultNode: {
|
25 | type: 'circle',
|
26 | style: {
|
27 | lineWidth: 1,
|
28 | stroke: colorSet.mainStroke,
|
29 | fill: colorSet.mainFill
|
30 | },
|
31 | size: 20,
|
32 | color: colorSet.mainStroke,
|
33 | linkPoints: {
|
34 | size: 8,
|
35 | lineWidth: 1,
|
36 | fill: colorSet.activeFill,
|
37 | stroke: colorSet.activeStroke
|
38 | }
|
39 | },
|
40 |
|
41 | nodeStateStyles: {
|
42 | active: {
|
43 | fill: colorSet.activeFill,
|
44 | stroke: colorSet.activeStroke,
|
45 | lineWidth: 2,
|
46 | shadowColor: colorSet.mainStroke,
|
47 | shadowBlur: 10
|
48 | },
|
49 | selected: {
|
50 | fill: colorSet.selectedFill,
|
51 | stroke: colorSet.selectedStroke,
|
52 | lineWidth: 4,
|
53 | shadowColor: colorSet.selectedStroke,
|
54 | shadowBlur: 10,
|
55 | 'text-shape': {
|
56 | fontWeight: 500
|
57 | }
|
58 | },
|
59 | highlight: {
|
60 | fill: colorSet.highlightFill,
|
61 | stroke: colorSet.highlightStroke,
|
62 | lineWidth: 2,
|
63 | 'text-shape': {
|
64 | fontWeight: 500
|
65 | }
|
66 | },
|
67 | inactive: {
|
68 | fill: colorSet.inactiveFill,
|
69 | stroke: colorSet.inactiveStroke,
|
70 | lineWidth: 1
|
71 | },
|
72 | disable: {
|
73 | fill: colorSet.disableFill,
|
74 | stroke: colorSet.disableStroke,
|
75 | lineWidth: 1
|
76 | }
|
77 | },
|
78 | edgeLabel: {
|
79 | style: {
|
80 | fill: textColor,
|
81 | textAlign: 'center',
|
82 | textBaseline: 'middle',
|
83 | fontSize: 12
|
84 | }
|
85 | },
|
86 | defaultEdge: {
|
87 | type: 'line',
|
88 | size: 1,
|
89 | style: {
|
90 | stroke: colorSet.edgeMainStroke,
|
91 | lineAppendWidth: 2
|
92 | },
|
93 | color: colorSet.edgeMainStroke
|
94 | },
|
95 |
|
96 | edgeStateStyles: {
|
97 | active: {
|
98 | stroke: colorSet.edgeActiveStroke,
|
99 | lineWidth: 1
|
100 | },
|
101 | selected: {
|
102 | stroke: colorSet.edgeSelectedStroke,
|
103 | lineWidth: 2,
|
104 | shadowColor: colorSet.edgeSelectedStroke,
|
105 | shadowBlur: 10,
|
106 | 'text-shape': {
|
107 | fontWeight: 500
|
108 | }
|
109 | },
|
110 | highlight: {
|
111 | stroke: colorSet.edgeHighlightStroke,
|
112 | lineWidth: 2,
|
113 | 'text-shape': {
|
114 | fontWeight: 500
|
115 | }
|
116 | },
|
117 | inactive: {
|
118 | stroke: colorSet.edgeInactiveStroke,
|
119 | lineWidth: 1
|
120 | },
|
121 | disable: {
|
122 | stroke: colorSet.edgeDisableStroke,
|
123 | lineWidth: 1
|
124 | }
|
125 | },
|
126 | comboLabel: {
|
127 | style: {
|
128 | fill: textColor,
|
129 |
|
130 | textBaseline: 'middle',
|
131 | fontSize: 12
|
132 | },
|
133 | refY: 10,
|
134 | refX: 10
|
135 |
|
136 | },
|
137 | defaultCombo: {
|
138 | type: 'circle',
|
139 | style: {
|
140 | fill: colorSet.comboMainFill,
|
141 | lineWidth: 1,
|
142 | stroke: colorSet.comboMainStroke,
|
143 | r: 5,
|
144 | width: 20,
|
145 | height: 10
|
146 | },
|
147 | size: [20, 5],
|
148 | color: colorSet.comboMainStroke,
|
149 | padding: [25, 20, 15, 20]
|
150 | },
|
151 |
|
152 | comboStateStyles: {
|
153 | active: {
|
154 | stroke: colorSet.comboActiveStroke,
|
155 | lineWidth: 1,
|
156 | fill: colorSet.comboActiveFill
|
157 | },
|
158 | selected: {
|
159 | stroke: colorSet.comboSelectedStroke,
|
160 | lineWidth: 2,
|
161 | fill: colorSet.comboSelectedFill,
|
162 | shadowColor: colorSet.comboSelectedStroke,
|
163 | shadowBlur: 10,
|
164 | 'text-shape': {
|
165 | fontWeight: 500
|
166 | }
|
167 | },
|
168 | highlight: {
|
169 | stroke: colorSet.comboHighlightStroke,
|
170 | lineWidth: 2,
|
171 | fill: colorSet.comboHighlightFill,
|
172 | 'text-shape': {
|
173 | fontWeight: 500
|
174 | }
|
175 | },
|
176 | inactive: {
|
177 | stroke: colorSet.comboInactiveStroke,
|
178 | fill: colorSet.comboInactiveFill,
|
179 | lineWidth: 1
|
180 | },
|
181 | disable: {
|
182 | stroke: colorSet.comboDisableStroke,
|
183 | fill: colorSet.comboDisableFill,
|
184 | lineWidth: 1
|
185 | }
|
186 | },
|
187 | delegateStyle: {
|
188 | fill: '#F3F9FF',
|
189 | fillOpacity: 0.5,
|
190 | stroke: '#1890FF',
|
191 | strokeOpacity: 0.9,
|
192 | lineDash: [5, 5]
|
193 | },
|
194 |
|
195 | textWaterMarkerConfig: {
|
196 | width: 150,
|
197 | height: 100,
|
198 | compatible: false,
|
199 | text: {
|
200 | x: 0,
|
201 | y: 60,
|
202 | lineHeight: 20,
|
203 | rotate: 20,
|
204 | fontSize: 14,
|
205 | fontFamily: 'Microsoft YaHei',
|
206 | fill: 'rgba(0, 0, 0, 0.1)',
|
207 | baseline: 'Middle'
|
208 | }
|
209 | },
|
210 | imageWaterMarkerConfig: {
|
211 | width: 150,
|
212 | height: 130,
|
213 | compatible: false,
|
214 | image: {
|
215 | x: 0,
|
216 | y: 0,
|
217 | width: 30,
|
218 | height: 20,
|
219 | rotate: 0
|
220 | }
|
221 | },
|
222 | waterMarkerImage: 'https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg'
|
223 | }; |
\ | No newline at end of file |