Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,18 @@ export interface CustomPaletteParams {
reverse?: boolean;
rangeType?: 'number' | 'percent';
continuity?: PaletteContinuity;
/**
* @deprecated - appears to be unused
*/
progression?: 'fixed';
rangeMin?: number;
rangeMax?: number;
/** lower color stops */
rangeMin?: number | null;
rangeMax?: number | null;
/** upper bounds of color stops ranges */
stops?: ColorStop[];
/** upper color stops */
/** lower bounds of color stops ranges */
colorStops?: ColorStop[];
steps?: number;
maxSteps?: number | undefined;
maxSteps?: number;
}

export type RequiredPaletteParamTypes = Assign<
Expand All @@ -159,5 +162,5 @@ export type RequiredPaletteParamTypes = Assign<

export interface ColorStop {
color: string;
stop: number;
stop: number | null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { schema } from '@kbn/config-schema';
import { esqlColumnSchema, genericOperationOptionsSchema } from '../metric_ops';
import { datasetSchema, datasetEsqlTableSchema } from '../dataset';
import { layerSettingsSchema, sharedPanelInfoSchema, dslOnlyPanelInfoSchema } from '../shared';
import { applyColorToSchema, colorByValueAbsolute } from '../color';
import { applyColorToSchema, colorByValueAbsoluteSchema } from '../color';
import { horizontalAlignmentSchema, verticalAlignmentSchema } from '../alignments';
import { mergeAllMetricsWithChartDimensionSchema } from './shared';

Expand Down Expand Up @@ -73,7 +73,7 @@ const legacyMetricStateMetricOptionsSchema = schema.object({
/**
* Color configuration
*/
color: schema.maybe(colorByValueAbsolute),
color: schema.maybe(colorByValueAbsoluteSchema),
});

export const legacyMetricStateSchemaNoESQL = schema.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
esqlColumnSchema,
genericOperationOptionsSchema,
} from '../metric_ops';
import { colorByValueAbsolute, staticColorSchema, applyColorToSchema } from '../color';
import { colorByValueAbsoluteSchema, staticColorSchema, applyColorToSchema } from '../color';
import { datasetSchema, datasetEsqlTableSchema } from '../dataset';
import {
collapseBySchema,
Expand Down Expand Up @@ -116,7 +116,7 @@ const metricStatePrimaryMetricOptionsSchema = schema.object({
/**
* Color configuration
*/
color: schema.maybe(schema.oneOf([colorByValueAbsolute, staticColorSchema])),
color: schema.maybe(schema.oneOf([colorByValueAbsoluteSchema, staticColorSchema])),
/**
* Where to apply the color (background or value)
*/
Expand Down Expand Up @@ -155,7 +155,7 @@ const metricStateSecondaryMetricOptionsSchema = schema.object({
/**
* Color configuration
*/
color: schema.maybe(schema.oneOf([colorByValueAbsolute, staticColorSchema])),
color: schema.maybe(schema.oneOf([colorByValueAbsoluteSchema, staticColorSchema])),
});

const metricStateBreakdownByOptionsSchema = schema.object({
Expand Down
Loading