sankey.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 sankey: IChartInfo = {
  9. id: ChartTypes.Sankey,
  10. name: 'sankey',
  11. title: '桑基图',
  12. icon: 'icon-kongjiansangjitu',
  13. coordinate: 'cartesian',
  14. rules: [{ dimension: [2, 9999], metric: 1 }],
  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. },
  34. style: {
  35. label: {
  36. showLabel: true,
  37. labelPosition: 'right',
  38. labelFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  39. labelFontSize: '12',
  40. labelColor: PIVOT_DEFAULT_FONT_COLOR
  41. },
  42. spec: {
  43. nodeWidth: 20,
  44. nodeGap: 8,
  45. orient: 'horizontal',
  46. draggable: true
  47. }
  48. }
  49. }
  50. export default sankey