settingConfig.js 2.2 KB

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