scatter.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import PivotTypes from './PivotTypes'
  2. import {
  3. PIVOT_DEFAULT_AXIS_LINE_COLOR,
  4. PIVOT_CHART_FONT_FAMILIES,
  5. PIVOT_DEFAULT_FONT_COLOR,
  6. PIVOT_DEFAULT_HEADER_BACKGROUND_COLOR
  7. } from 'app/globalConstants'
  8. import { IChartInfo } from 'containers/Widget/components/Widget'
  9. const scatter: IChartInfo = {
  10. id: PivotTypes.Scatter,
  11. name: 'scatter',
  12. title: '散点图',
  13. icon: 'icon-scatter-chart',
  14. coordinate: 'cartesian',
  15. rules: [{ dimension: [0, 9999], metric: [1, 9999] }],
  16. data: {
  17. cols: {
  18. title: '列',
  19. type: 'category'
  20. },
  21. rows: {
  22. title: '行',
  23. type: 'category'
  24. },
  25. metrics: {
  26. title: '指标',
  27. type: 'value'
  28. },
  29. filters: {
  30. title: '筛选',
  31. type: 'all'
  32. },
  33. xAxis: {
  34. title: 'x数据轴',
  35. type: 'value'
  36. },
  37. color: {
  38. title: '颜色',
  39. type: 'category'
  40. },
  41. size: {
  42. title: '尺寸',
  43. type: 'value'
  44. },
  45. label: {
  46. title: '标签',
  47. type: 'all'
  48. },
  49. tip: {
  50. title: '提示信息',
  51. type: 'value'
  52. }
  53. },
  54. style: {
  55. xAxis: {
  56. showLine: true,
  57. lineStyle: 'solid',
  58. lineSize: '1',
  59. lineColor: PIVOT_DEFAULT_AXIS_LINE_COLOR,
  60. showLabel: true,
  61. labelFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  62. labelFontSize: '12',
  63. labelColor: PIVOT_DEFAULT_FONT_COLOR
  64. },
  65. yAxis: {
  66. showLine: true,
  67. lineStyle: 'solid',
  68. lineSize: '1',
  69. lineColor: PIVOT_DEFAULT_AXIS_LINE_COLOR,
  70. showLabel: true,
  71. labelFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  72. labelFontSize: '12',
  73. labelColor: PIVOT_DEFAULT_FONT_COLOR,
  74. showTitleAndUnit: true,
  75. titleFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  76. titleFontSize: '12',
  77. titleColor: PIVOT_DEFAULT_FONT_COLOR
  78. },
  79. splitLine: {
  80. showHorizontalLine: true,
  81. horizontalLineStyle: 'dashed',
  82. horizontalLineSize: '1',
  83. horizontalLineColor: PIVOT_DEFAULT_AXIS_LINE_COLOR,
  84. showVerticalLine: false,
  85. verticalLineStyle: 'dashed',
  86. verticalLineSize: '1',
  87. verticalLineColor: PIVOT_DEFAULT_AXIS_LINE_COLOR
  88. },
  89. pivot: {
  90. fontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  91. fontSize: '12',
  92. color: PIVOT_DEFAULT_FONT_COLOR,
  93. lineStyle: 'solid',
  94. lineColor: PIVOT_DEFAULT_AXIS_LINE_COLOR,
  95. headerBackgroundColor: PIVOT_DEFAULT_HEADER_BACKGROUND_COLOR
  96. }
  97. }
  98. }
  99. export default scatter