diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js b/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js index ea8ac40c34db..e9a3e1008cdd 100644 --- a/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js +++ b/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js @@ -30,6 +30,7 @@ import { cloneDeep } from 'lodash'; import { euiThemeVars } from '@osd/ui-shared-deps/theme'; +import { euiPaletteColorBlind } from '@elastic/eui'; import { VegaParser } from './vega_parser'; import { bypassExternalUrlCheck } from '../vega_view/vega_base_view'; @@ -88,7 +89,7 @@ describe(`VegaParser._setDefaultColors`, () => { tickColor: euiThemeVars.euiColorChartLines, }, background: 'transparent', - range: { category: { scheme: 'elastic' } }, + range: { category: euiPaletteColorBlind() }, mark: { color: '#54B399' }, style: { 'group-title': { @@ -121,7 +122,7 @@ describe(`VegaParser._setDefaultColors`, () => { tickColor: euiThemeVars.euiColorChartLines, }, background: 'transparent', - range: { category: { scheme: 'elastic' } }, + range: { category: euiPaletteColorBlind() }, arc: { fill: '#54B399' }, area: { fill: '#54B399' }, line: { stroke: '#54B399' }, diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts b/src/plugins/vis_type_vega/public/data_model/vega_parser.ts index d1d5712ec7cc..64ed96f7e3e7 100644 --- a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts +++ b/src/plugins/vis_type_vega/public/data_model/vega_parser.ts @@ -677,7 +677,7 @@ The URL is an identifier only. OpenSearch Dashboards and your browser will never */ _setDefaultColors() { // Default category coloring to the OpenSearch color scheme - this._setDefaultValue({ scheme: 'elastic' }, 'config', 'range', 'category'); + this._setDefaultValue(euiPaletteColorBlind(), 'config', 'range', 'category'); if (this.isVegaLite) { // Vega-Lite: set default color, works for fill and strike -- config: { mark: { color: '#54B399' }} diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_base_view.js b/src/plugins/vis_type_vega/public/vega_view/vega_base_view.js index 1286495af901..cf52df5d4557 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_base_view.js +++ b/src/plugins/vis_type_vega/public/vega_view/vega_base_view.js @@ -41,7 +41,7 @@ import { opensearchFilters } from '../../../data/public'; import { getEnableExternalUrls, getData } from '../services'; import { extractIndexPatternsFromSpec } from '../lib/extract_index_pattern'; -vega.scheme('elastic', euiPaletteColorBlind()); +vega.scheme('euiPaletteColorBlind', euiPaletteColorBlind()); // Vega's extension functions are global. When called, // we forward execution to the instance-specific handler