settingConfig.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import { commonConfig, displayOption } from 'data-room-ui/js/config'
  2. import Icon from 'data-room-ui/assets/images/bigScreenIcon/export'
  3. import cloneDeep from 'lodash/cloneDeep'
  4. export const settingConfig = {
  5. padding: [0, 30, 50, 80],
  6. legend: false,
  7. isGroup: true,
  8. data: [],
  9. color: '',
  10. theme: 'dark',
  11. displayOption: {
  12. ...displayOption,
  13. params: {
  14. enable: true
  15. },
  16. headerField: {
  17. enable: false
  18. }
  19. }
  20. }
  21. const customConfig = {
  22. type: 'candlestick',
  23. root: {
  24. version: '2023071001',
  25. contribution: false,
  26. // 绕x轴旋转角度
  27. rotateX: 0,
  28. // 绕y轴旋转角度
  29. rotateY: 0,
  30. // 绕z轴旋转角度
  31. rotateZ: 0,
  32. // 透视距离
  33. perspective: 0,
  34. skewX: 0,
  35. skewY: 0
  36. },
  37. customize: {
  38. // 自定义样式
  39. highColor: '#c23531',
  40. lowColor: '#314656',
  41. gridShow: true,
  42. gridColor: '#314656',
  43. gridWidth: 1,
  44. xAxis: {
  45. name: '',
  46. nameColor: '#fff',
  47. nameSize: 16,
  48. position: 'end',
  49. tickWidth: 1,
  50. tickColor: '#fff',
  51. labelColor: '#fff',
  52. labelSize: 12,
  53. lineColor: '#fff',
  54. lineWidth: 1
  55. },
  56. yAxis: {
  57. name: '',
  58. nameColor: '#fff',
  59. nameSize: 16,
  60. position: 'end',
  61. tickWidth: 1,
  62. tickColor: '#fff',
  63. labelColor: '#fff',
  64. labelSize: 12,
  65. lineColor: '#fff',
  66. lineWidth: 1
  67. }
  68. }
  69. }
  70. export const dataConfig = {
  71. ...commonConfig(customConfig)
  72. }
  73. export const candlestickData = {
  74. name: 'K线图',
  75. title: 'K线图',
  76. icon: Icon.getNameList()[34],
  77. border: { type: '', titleHeight: 60, fontSize: 16, isTitle: true, padding: [0, 0, 0, 0] },
  78. className:
  79. 'com.gccloud.dataroom.core.module.chart.components.ScreenCandlestickChart',
  80. w: 450,
  81. h: 320,
  82. x: 0,
  83. y: 0,
  84. type: 'candlestick',
  85. option: {
  86. ...cloneDeep(settingConfig)
  87. },
  88. setting: undefined, // 右侧面板自定义配置
  89. dataHandler: {}, // 数据自定义处理js脚本
  90. ...cloneDeep(dataConfig),
  91. dataSource: {
  92. ...cloneDeep(dataConfig.dataSource),
  93. xField: '',
  94. openField: '',
  95. closeField: '',
  96. lowField: '',
  97. highField: ''
  98. }
  99. }