3328350766
6 天以前 761eb03d6b3bebd0b197179564c84d89d3d12a0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { commonConfig, displayOption } from 'data-room-ui/js/config'
import Icon from 'data-room-ui/assets/images/bigScreenIcon/export'
import cloneDeep from 'lodash/cloneDeep'
 
export const settingConfig = {
  padding: [10, 10, 10, 10],
  legend: false,
  isGroup: true,
  data: [],
  color: '',
  theme: 'dark',
  displayOption: {
    ...displayOption,
    params: {
      enable: true
    },
    dimensionField: {
      // 指标
      label: '起始节点',
      enable: true,
      multiple: false // 是否多选
    },
    metricField: {
      label: '目标节点', // 维度/查询字段
      enable: true,
      multiple: false // 是否多选
    },
    seriesField: {
      // 系列
      label: '权重',
      enable: true,
      multiple: false // 是否多选
    }
  }
}
const customConfig = {
  type: 'sankey',
  root: {
    version: '2023071001',
    contribution: false,
    // 绕x轴旋转角度
    rotateX: 0,
    // 绕y轴旋转角度
    rotateY: 0,
    // 绕z轴旋转角度
    rotateZ: 0,
    // 透视距离
    perspective: 0,
    skewX: 0,
    skewY: 0
  },
  customize: {
    // 自定义样式
    top: 20,
    bottom: 20,
    left: 20,
    right: 50,
    normal: {
      labelPosition: 'right',
      labelColor: '#fff',
      labelSize: 12,
      labelFontWeight: 'bold',
      itemBorderColor: '#aaa',
      itemBorderWidth: 1,
      itemBorderType: 'solid',
      lineColor: 'gradient',
      lineCurveness: 0.5
    },
    emphasis: {
      labelPosition: 'right',
      labelColor: '#fff',
      labelSize: 12,
      labelFontWeight: 'bold',
      itemBorderColor: '#aaa',
      itemBorderWidth: 1,
      itemBorderType: 'solid',
      lineColor: 'gradient',
      lineCurveness: 0.5
    }
  }
}
 
export const dataConfig = {
  ...commonConfig(customConfig)
}
 
export const sankeyData = {
  name: '桑基图',
  title: '桑基图',
  icon: Icon.getNameList()[35],
  border: { type: '', titleHeight: 60, fontSize: 16, isTitle: true, padding: [0, 0, 0, 0] },
  className:
    'com.sxlinks.modules.system.components.visual.ScreenSankeyChart',
  w: 450,
  h: 320,
  x: 0,
  y: 0,
  type: 'sankey',
  option: {
    ...cloneDeep(settingConfig)
  },
  setting: undefined, // 右侧面板自定义配置
  dataHandler: {}, // 数据自定义处理js脚本
  ...cloneDeep(dataConfig)
}