slack.tsx 809 B

123456789101112131415161718192021222324
  1. import Grid from 'app/components/charts/components/grid';
  2. import Legend from 'app/components/charts/components/legend';
  3. import XAxis from 'app/components/charts/components/xAxis';
  4. import YAxis from 'app/components/charts/components/yAxis';
  5. import {lightTheme as theme} from 'app/utils/theme';
  6. /**
  7. * Size configuration for SLACK_* type charts
  8. */
  9. export const slackChartSize = {
  10. height: 150,
  11. width: 450,
  12. };
  13. /**
  14. * Default echarts option config for slack charts
  15. */
  16. export const slackChartDefaults = {
  17. grid: Grid({left: 5, right: 5, bottom: 5}),
  18. backgroundColor: theme.background,
  19. legend: Legend({theme, itemHeight: 6, top: 2, right: 10}),
  20. yAxis: YAxis({theme, splitNumber: 3, axisLabel: {fontSize: 11}}),
  21. xAxis: XAxis({theme, nameGap: 5, isGroupedByDate: true, axisLabel: {fontSize: 11}}),
  22. };