Skip to content

Commit

Permalink
Fix problem on new TSVB and add new field to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Jun 8, 2020
1 parent 49fbbdb commit a435467
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const TimeSeries = ({
baseTheme={theme}
tooltip={{
snap: true,
type: tooltipMode === 'show_all' ? TooltipType.VerticalCursor : TooltipType.Follow,
type: tooltipMode === 'show_focused' ? TooltipType.Follow : TooltipType.VerticalCursor,
headerFormatter: tooltipFormatter,
}}
/>
Expand Down
1 change: 1 addition & 0 deletions src/plugins/vis_type_timeseries/public/metrics_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const metricsVisDefinition = {
axis_scale: 'normal',
show_legend: 1,
show_grid: 1,
tooltip_mode: 'show_all',
},
component: VisEditor,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ export const visPayloadSchema = schema.object({
series: schema.arrayOf(seriesItems),
show_grid: numberIntegerRequired,
show_legend: numberIntegerRequired,
tooltip_mode: schema.maybe(
schema.oneOf([schema.literal('show_all'), schema.literal('show_focused')])
),
time_field: stringOptionalNullable,
time_range_mode: stringOptionalNullable,
type: stringRequired,
Expand Down

0 comments on commit a435467

Please sign in to comment.