slack.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import Grid from 'sentry/components/charts/components/grid';
  2. import Legend from 'sentry/components/charts/components/legend';
  3. import XAxis from 'sentry/components/charts/components/xAxis';
  4. import YAxis from 'sentry/components/charts/components/yAxis';
  5. import {lightTheme as theme} from 'sentry/utils/theme';
  6. export const DEFAULT_FONT_FAMILY = 'sans-serif';
  7. /**
  8. * Size configuration for SLACK_* type charts
  9. */
  10. export const slackChartSize = {
  11. height: 150,
  12. width: 450,
  13. };
  14. export const slackGeoChartSize = {
  15. height: 200,
  16. width: 450,
  17. };
  18. /**
  19. * Default echarts option config for slack charts
  20. */
  21. export const slackChartDefaults = {
  22. grid: Grid({left: 5, right: 5, bottom: 5}),
  23. backgroundColor: theme.background,
  24. legend: Legend({
  25. theme,
  26. itemHeight: 6,
  27. top: 2,
  28. right: 10,
  29. textStyle: {fontFamily: DEFAULT_FONT_FAMILY},
  30. }),
  31. yAxis: YAxis({
  32. theme,
  33. splitNumber: 3,
  34. axisLabel: {fontSize: 11, fontFamily: DEFAULT_FONT_FAMILY},
  35. }),
  36. xAxis: XAxis({
  37. theme,
  38. nameGap: 5,
  39. isGroupedByDate: true,
  40. axisLabel: {fontSize: 11, fontFamily: DEFAULT_FONT_FAMILY},
  41. }),
  42. };