table.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import ChartTypes from './ChartTypes'
  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 table: IChartInfo = {
  10. id: ChartTypes.Table,
  11. name: 'table',
  12. title: '表格',
  13. icon: 'icon-table',
  14. coordinate: 'other',
  15. rules: [{ dimension: [0, 9999], metric: [0, 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. },
  34. style: {
  35. table: {
  36. fontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  37. fontSize: '12',
  38. color: PIVOT_DEFAULT_FONT_COLOR,
  39. lineStyle: 'solid',
  40. lineColor: PIVOT_DEFAULT_AXIS_LINE_COLOR,
  41. headerBackgroundColor: PIVOT_DEFAULT_HEADER_BACKGROUND_COLOR,
  42. headerConfig: [],
  43. columnsConfig: [],
  44. leftFixedColumns: [],
  45. rightFixedColumns: [],
  46. headerFixed: true,
  47. autoMergeCell: true,
  48. bordered: true,
  49. size: 'default',
  50. withPaging: true,
  51. pageSize: '20',
  52. withNoAggregators: true
  53. },
  54. spec: {
  55. }
  56. }
  57. }
  58. export default table