Skip to content

Commit

Permalink
Merge branch 'feature/129299' of github.com:dej611/kibana into featur…
Browse files Browse the repository at this point in the history
…e/129299
  • Loading branch information
mbondyra committed Sep 7, 2022
2 parents cdf64fe + f3f6bdb commit 64535f2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export const createArgsWithLayers = (
],
layers: Array.isArray(layers) ? layers : [layers],
annotations: {
type: 'event_annotations_result',
layers: [],
datatable: {
type: 'datatable',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,21 @@ export interface XYArgs extends DataLayerArgs {
showTooltip: boolean;
}

export interface ExpressionAnnotationsLayers {
layers: AnnotationLayerConfigResult[];
datatable: Datatable;
}
export type ExpressionAnnotationResult = ExpressionAnnotationsLayers & {
type: 'event_annotations_result';
};

export interface LayeredXYArgs {
legend: LegendConfigResult;
endValue?: EndValue;
emphasizeFitting?: boolean;
valueLabels: ValueLabelMode;
layers?: XYExtendedLayerConfigResult[];
annotations?: {
layers: AnnotationLayerConfigResult[];
datatable: Datatable;
};
annotations?: ExpressionAnnotationResult;
fittingFunction?: FittingFunction;
fillOpacity?: number;
hideEndzones?: boolean;
Expand Down Expand Up @@ -282,10 +287,7 @@ export interface XYProps {
orderBucketsBySum?: boolean;
showTooltip: boolean;
singleTable?: boolean;
annotations?: {
layers: AnnotationLayerConfigResult[];
datatable: Datatable;
};
annotations?: ExpressionAnnotationResult;
}

export interface AnnotationLayerArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3084,6 +3084,7 @@ describe('XYChart component', () => {
...args,
layers: [dateHistogramLayer],
annotations: {
type: 'event_annotations_result' as const,
layers: annotationLayers,
datatable: {
type: 'datatable' as const,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function validateColumn(
}
if (missingTooltipFields.length) {
invalidMessages.push(
i18n.translate('xpack.lens.xyChart.annotationError.textFieldNotFound', {
i18n.translate('xpack.lens.xyChart.annotationError.tooltipFieldNotFound', {
defaultMessage:
'Tooltip {missingFields, plural, one {field} other {fields}} {missingTooltipFields} not found in data view {dataView}',
values: {
Expand Down

0 comments on commit 64535f2

Please sign in to comment.