radar.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import ChartTypes from './ChartTypes'
  2. import {
  3. PIVOT_CHART_FONT_FAMILIES,
  4. PIVOT_DEFAULT_FONT_COLOR,
  5. CHART_PIE_LABEL_POSITIONS
  6. } from 'app/globalConstants'
  7. import { IChartInfo } from 'containers/Widget/components/Widget'
  8. const radar: IChartInfo = {
  9. id: ChartTypes.Radar,
  10. name: 'radar',
  11. title: '雷达图',
  12. icon: 'icon-radarchart',
  13. coordinate: 'cartesian',
  14. rules: [{ dimension: 1, metric: [1, 9999] }, { dimension: 0, metric: [3, 9999] }],
  15. dimetionAxis: 'col',
  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. color: {
  34. title: '颜色',
  35. type: 'category'
  36. }
  37. // tip: {
  38. // title: '提示信息',
  39. // type: 'value'
  40. // }
  41. },
  42. style: {
  43. label: {
  44. showLabel: true,
  45. labelFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  46. labelFontSize: '12',
  47. labelColor: PIVOT_DEFAULT_FONT_COLOR,
  48. labelParts: ['indicatorName', 'indicatorValue']
  49. },
  50. legend: {
  51. showLegend: true,
  52. legendPosition: 'right',
  53. selectAll: true,
  54. fontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  55. fontSize: '12',
  56. color: PIVOT_DEFAULT_FONT_COLOR
  57. },
  58. radar: {
  59. shape: 'polygon', // 'polygon' | 'circle'
  60. name: {
  61. show: true,
  62. fontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  63. fontSize: '12',
  64. color: PIVOT_DEFAULT_FONT_COLOR
  65. },
  66. nameGap: 15,
  67. splitNumber: 5
  68. },
  69. spec: {}
  70. // toolbox: {
  71. // showToolbox: false
  72. // }
  73. }
  74. }
  75. export default radar