All files / ee/app/assets/javascripts/analytics/shared constants.js

100% Statements 9/9
100% Branches 0/0
100% Functions 0/0
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66        62x                   62x   62x                       62x             62x                     62x             62x         62x       62x      
import { DATA_VIZ_BLUE_500, GRAY_300, GRAY_50 } from '@gitlab/ui/dist/tokens/js/tokens';
import { defaultAreaOpacity } from '@gitlab/ui/dist/utils/charts/config';
import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants';
 
export const scatterChartLineProps = {
  default: {
    type: 'line',
    showSymbol: false,
    // By default zlevel is 2 for all series types.
    // By increasing the zlevel to 3 we make sure that the trendline gets drawn in front of the dots in the chart.
    zlevel: 3,
  },
};
 
export const DATA_REFETCH_DELAY = DEFAULT_DEBOUNCE_AND_THROTTLE_MS;
 
export const BASE_SERIES_DATA_OPTIONS = {
  showSymbol: true,
  showAllSymbol: true,
  symbolSize: 8,
  lineStyle: {
    color: DATA_VIZ_BLUE_500,
  },
  itemStyle: {
    color: DATA_VIZ_BLUE_500,
  },
};
 
export const DEFAULT_SERIES_DATA_OPTIONS = {
  ...BASE_SERIES_DATA_OPTIONS,
  areaStyle: {
    opacity: 0,
  },
};
 
export const BASE_NULL_SERIES_OPTIONS = {
  showSymbol: false,
  lineStyle: {
    type: 'dashed',
    color: GRAY_300,
  },
  itemStyle: {
    color: GRAY_300,
  },
};
 
export const DEFAULT_NULL_SERIES_OPTIONS = {
  ...BASE_NULL_SERIES_OPTIONS,
  areaStyle: {
    color: 'none',
  },
};
 
export const BASE_FORECAST_SERIES_OPTIONS = {
  lineStyle: { type: 'dashed', color: DATA_VIZ_BLUE_500 },
  areaStyle: { opacity: defaultAreaOpacity, color: GRAY_50 },
};
 
export const STACKED_AREA_CHART_SERIES_OPTIONS = {
  stack: 'chart',
};
 
export const STACKED_AREA_CHART_NULL_SERIES_OPTIONS = {
  stack: 'null',
};