Skip to content

Commit ca9cd7f

Browse files
committed
fix conflicts
Signed-off-by: Qxisylolo <[email protected]>
1 parent ec1b649 commit ca9cd7f

File tree

10 files changed

+21
-9
lines changed

10 files changed

+21
-9
lines changed

src/plugins/explore/public/components/visualizations/bar/bar_chart_utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
} from '../types';
1414
import { applyAxisStyling, getSchemaByAxis } from '../utils/utils';
1515
import { BarChartStyle } from './bar_vis_config';
16-
import { getColors, DEFAULT_GREY, resolveColor } from '../theme/default_colors';
16+
import { getColors, DEFAULT_GREY } from '../theme/default_colors';
17+
import { resolveColor } from '../theme/color_utils';
1718

1819
export const inferTimeIntervals = (data: Array<Record<string, any>>, field: string | undefined) => {
1920
if (!data || data.length === 0 || !field) {

src/plugins/explore/public/components/visualizations/bar_gauge/bar_gauge_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { AxisColumnMappings, Threshold, VisFieldType } from '../types';
77
import { BarGaugeChartStyle } from './bar_gauge_vis_config';
8-
import { resolveColor } from '../theme/default_colors';
8+
import { resolveColor } from '../theme/color_utils';
99

1010
export const getBarOrientation = (
1111
styles: BarGaugeChartStyle,

src/plugins/explore/public/components/visualizations/bar_gauge/to_expression.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jest.mock('../utils/calculation', () => ({
1818
jest.mock('../theme/default_colors', () => ({
1919
darkenColor: jest.fn((color) => '#00000'),
2020
getColors: jest.fn(() => ({ text: 'black', statusGreen: 'green', backgroundShade: 'grey' })),
21+
}));
22+
23+
jest.mock('../theme/color_utils', () => ({
2124
resolveColor: jest.fn((color) => color),
2225
}));
2326

src/plugins/explore/public/components/visualizations/bar_gauge/to_expression.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { groupBy } from 'lodash';
77
import { BarGaugeChartStyle } from './bar_gauge_vis_config';
88
import { VisColumn, AxisColumnMappings, VEGASCHEMA, Threshold, VisFieldType } from '../types';
99
import { calculateValue } from '../utils/calculation';
10-
import { getColors, resolveColor } from '../theme/default_colors';
10+
import { getColors } from '../theme/default_colors';
11+
import { resolveColor } from '../theme/color_utils';
1112
import { getSchemaByAxis } from '../utils/utils';
1213
import {
1314
getBarOrientation,

src/plugins/explore/public/components/visualizations/gauge/to_expression.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
mergeThresholdsWithBase,
1414
getMaxAndMinBase,
1515
} from '../style_panel/threshold/threshold_utils';
16-
import { getColors, DEFAULT_GREY, resolveColor } from '../theme/default_colors';
16+
import { getColors, DEFAULT_GREY } from '../theme/default_colors';
17+
import { resolveColor } from '../theme/color_utils';
1718
import { getUnitById, showDisplayValue } from '../style_panel/unit/collection';
1819

1920
export const createGauge = (

src/plugins/explore/public/components/visualizations/heatmap/heatmap_chart_utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import type { Encoding } from 'vega-lite/build/src/encoding';
77
import { AggregationType, VisColumn } from '../types';
88
import { HeatmapChartStyle } from './heatmap_vis_config';
99

10-
import { getColors, DEFAULT_GREY, resolveColor } from '../theme/default_colors';
10+
import { getColors, DEFAULT_GREY } from '../theme/default_colors';
11+
import { resolveColor } from '../theme/color_utils';
1112

1213
// isRegular=== true refers to 2 dimension and 1 metric heatmap.
1314
export const createLabelLayer = (

src/plugins/explore/public/components/visualizations/histogram/histogram_vis_config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('bar_vis_config', () => {
2424

2525
// Threshold and grid
2626
thresholdOptions: {
27-
baseColor: '#00BD6B',
27+
baseColor: '#017D73',
2828
thresholds: [],
2929
thresholdStyle: ThresholdMode.Off,
3030
},

src/plugins/explore/public/components/visualizations/metric/to_expression.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { MetricChartStyle } from './metric_vis_config';
77
import { VisColumn, VEGASCHEMA, AxisRole, AxisColumnMappings, Threshold } from '../types';
88
import { getTooltipFormat } from '../utils/utils';
99
import { calculatePercentage, calculateValue } from '../utils/calculation';
10-
import { getColors, resolveColor } from '../theme/default_colors';
10+
import { getColors } from '../theme/default_colors';
11+
import { resolveColor } from '../theme/color_utils';
1112
import { DEFAULT_OPACITY } from '../constants';
1213
import { getUnitById, showDisplayValue } from '../style_panel/unit/collection';
1314
import {

src/plugins/explore/public/components/visualizations/style_panel/color_group_panel/color_group_panel.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ jest.mock('../../../visualizations/theme/color_utils', () => ({
1616
blue1: '#5885bfff',
1717
},
1818
}),
19-
resolveColor: (color: string) => color,
19+
resolveColor: jest.fn((color) => color),
20+
}));
21+
22+
jest.mock('../../../visualizations/theme/default_colors', () => ({
2023
getColors: () => [],
2124
}));
2225

src/plugins/explore/public/components/visualizations/style_panel/threshold/threshold_utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { getColors, resolveColor } from '../../theme/default_colors';
6+
import { getColors } from '../../theme/default_colors';
7+
import { resolveColor } from '../../theme/color_utils';
78
import {
89
Threshold,
910
ThresholdLine,

0 commit comments

Comments
 (0)