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
106
107
108
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: [0, 30, 50, 80],
  legend: false,
  isGroup: true,
  data: [],
  color: '',
  theme: 'dark',
  displayOption: {
    ...displayOption,
    params: {
      enable: true
    },
    headerField: {
      enable: false
    }
  }
}
const customConfig = {
  type: 'candlestick',
  root: {
    version: '2023071001',
    contribution: false,
    // 绕x轴旋转角度
    rotateX: 0,
    // 绕y轴旋转角度
    rotateY: 0,
    // 绕z轴旋转角度
    rotateZ: 0,
    // 透视距离
    perspective: 0,
    skewX: 0,
    skewY: 0
  },
  customize: {
    // 自定义样式
    highColor: '#c23531',
    lowColor: '#314656',
    gridShow: true,
    gridColor: '#314656',
    gridWidth: 1,
    left: 50,
    right: 20,
    top: 20,
    bottom: 60,
    xAxis: {
      name: '',
      nameGap: 30,
      nameColor: '#fff',
      nameSize: 16,
      position: 'end',
      tickWidth: 1,
      tickColor: '#fff',
      labelColor: '#fff',
      labelSize: 12,
      lineColor: '#fff',
      lineWidth: 1
    },
    yAxis: {
      name: '',
      nameGap: 10,
      nameColor: '#fff',
      nameSize: 16,
      position: 'end',
      tickWidth: 1,
      tickColor: '#fff',
      labelColor: '#fff',
      labelSize: 12,
      lineColor: '#fff',
      lineWidth: 1
    }
  }
}
 
export const dataConfig = {
  ...commonConfig(customConfig)
}
 
export const candlestickData = {
  name: 'K线图',
  title: 'K线图',
  icon: Icon.getNameList()[34],
  border: { type: '', titleHeight: 60, fontSize: 16, isTitle: true, padding: [0, 0, 0, 0] },
  className:
    'com.sxlinks.modules.system.components.visual.ScreenCandlestickChart',
  w: 450,
  h: 320,
  x: 0,
  y: 0,
  type: 'candlestick',
  option: {
    ...cloneDeep(settingConfig)
  },
  setting: undefined, // 右侧面板自定义配置
  dataHandler: {}, // 数据自定义处理js脚本
  ...cloneDeep(dataConfig),
  dataSource: {
    ...cloneDeep(dataConfig.dataSource),
    xfield: '',
    openField: '',
    closeField: '',
    lowField: '',
    highField: ''
  }
}