scorecard.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2017 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * >>
  19. */
  20. import ChartTypes from './ChartTypes'
  21. import {
  22. PIVOT_DEFAULT_AXIS_LINE_COLOR,
  23. PIVOT_CHART_FONT_FAMILIES,
  24. PIVOT_DEFAULT_FONT_COLOR,
  25. CHART_LABEL_POSITIONS
  26. } from 'app/globalConstants'
  27. import { IChartInfo } from 'containers/Widget/components/Widget'
  28. const scorecard: IChartInfo = {
  29. id: ChartTypes.Scorecard,
  30. name: 'scorecard',
  31. title: '翻牌器',
  32. icon: 'icon-calendar1',
  33. coordinate: 'other',
  34. rules: [{ dimension: 0, metric: [1, 3] }],
  35. data: {
  36. cols: {
  37. title: '列',
  38. type: 'category'
  39. },
  40. rows: {
  41. title: '行',
  42. type: 'category'
  43. },
  44. metrics: {
  45. title: '指标',
  46. type: 'value'
  47. },
  48. filters: {
  49. title: '筛选',
  50. type: 'all'
  51. }
  52. },
  53. style: {
  54. scorecard: {
  55. headerVisible: true,
  56. headerColor: PIVOT_DEFAULT_FONT_COLOR,
  57. headerFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  58. prefixHeader: '',
  59. suffixHeader: '',
  60. prefixHeaderColor: PIVOT_DEFAULT_FONT_COLOR,
  61. prefixHeaderFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  62. suffixHeaderColor: PIVOT_DEFAULT_FONT_COLOR,
  63. suffixHeaderFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  64. contentVisible: true,
  65. contentColor: PIVOT_DEFAULT_FONT_COLOR,
  66. contentFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  67. prefixContent: '',
  68. suffixContent: '',
  69. prefixContentColor: PIVOT_DEFAULT_FONT_COLOR,
  70. prefixContentFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  71. suffixContentColor: PIVOT_DEFAULT_FONT_COLOR,
  72. suffixContentFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  73. footerVisible: true,
  74. footerColor: PIVOT_DEFAULT_FONT_COLOR,
  75. fontFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  76. prefixFooter: '',
  77. suffixFooter: '',
  78. prefixFooterColor: PIVOT_DEFAULT_FONT_COLOR,
  79. prefixFooterFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  80. suffixFooterColor: PIVOT_DEFAULT_FONT_COLOR,
  81. suffixFooterFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
  82. fontSizeFixed: false,
  83. fontSizeMain: '48',
  84. fontSizeSub: '18'
  85. },
  86. spec: {
  87. }
  88. }
  89. }
  90. export default scorecard