settingConfig.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. left: 50,
  45. right: 20,
  46. top: 20,
  47. bottom: 60,
  48. xAxis: {
  49. name: '',
  50. nameColor: '#fff',
  51. nameSize: 16,
  52. position: 'end',
  53. tickWidth: 1,
  54. tickColor: '#fff',
  55. labelColor: '#fff',
  56. labelSize: 12,
  57. lineColor: '#fff',
  58. lineWidth: 1
  59. },
  60. yAxis: {
  61. name: '',
  62. nameColor: '#fff',
  63. nameSize: 16,
  64. position: 'end',
  65. tickWidth: 1,
  66. tickColor: '#fff',
  67. labelColor: '#fff',
  68. labelSize: 12,
  69. lineColor: '#fff',
  70. lineWidth: 1
  71. }
  72. }
  73. }
  74. export const dataConfig = {
  75. ...commonConfig(customConfig)
  76. }
  77. export const candlestickData = {
  78. name: 'K线图',
  79. title: 'K线图',
  80. icon: Icon.getNameList()[34],
  81. border: { type: '', titleHeight: 60, fontSize: 16, isTitle: true, padding: [0, 0, 0, 0] },
  82. className:
  83. 'com.gccloud.dataroom.core.module.chart.components.ScreenCandlestickChart',
  84. w: 450,
  85. h: 320,
  86. x: 0,
  87. y: 0,
  88. type: 'candlestick',
  89. option: {
  90. ...cloneDeep(settingConfig)
  91. },
  92. setting: undefined, // 右侧面板自定义配置
  93. dataHandler: {}, // 数据自定义处理js脚本
  94. ...cloneDeep(dataConfig),
  95. dataSource: {
  96. ...cloneDeep(dataConfig.dataSource),
  97. xfield: '',
  98. openField: '',
  99. closeField: '',
  100. lowField: '',
  101. highField: ''
  102. }
  103. }