Matteo Scandolo | 0c61c9b | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 1 | interface ISvgMarker { |
2 | id: string; | ||||
3 | width: number; | ||||
4 | height: number; | ||||
5 | refX: number; | ||||
6 | refY: number; | ||||
7 | viewBox: string; | ||||
8 | path: string; // svg path | ||||
9 | } | ||||
10 | |||||
11 | export interface IXosServiceGraphConfig { | ||||
12 | force: { | ||||
13 | linkDistance: number; | ||||
14 | charge: number; | ||||
15 | gravity: number; | ||||
16 | }; | ||||
17 | node: { | ||||
18 | padding: number; | ||||
19 | radius: number; | ||||
20 | }; | ||||
21 | markers: ISvgMarker[]; | ||||
22 | } | ||||
23 | |||||
24 | export const XosServiceGraphConfig: IXosServiceGraphConfig = { | ||||
25 | force: { | ||||
Matteo Scandolo | 0e8a842 | 2017-03-25 14:55:40 -0700 | [diff] [blame] | 26 | linkDistance: 80, |
Matteo Scandolo | 0c61c9b | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 27 | charge: -60, |
28 | gravity: 0.01 | ||||
29 | }, | ||||
30 | node: { | ||||
31 | padding: 10, | ||||
32 | radius: 2 | ||||
33 | }, | ||||
34 | markers: [ | ||||
35 | { | ||||
36 | id: 'arrow', | ||||
37 | width: 10, | ||||
38 | height: 10, | ||||
39 | refX: -80, | ||||
40 | refY: 0, | ||||
41 | viewBox: '0 -5 10 10', | ||||
42 | path: 'M10,-5L0,0L10,5' | ||||
43 | } | ||||
44 | ] | ||||
45 | }; |