Skip to content

Commit

Permalink
Fix cannot brush on bars of vertical bar chart to zoom into data (#94290
Browse files Browse the repository at this point in the history
)

Closes: #94248
  • Loading branch information
alexwizp authored Mar 10, 2021
1 parent c9e81be commit 50dac66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/vis_type_vislib/public/vislib/lib/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export class Handler {
return function (eventPayload) {
switch (eventType) {
case 'brush':
const xRaw = _.get(eventPayload.data, 'series[0].values[0].xRaw');
const { xRaw } = eventPayload.data.series[0]?.values.find(({ xRaw }) => Boolean(xRaw));

if (!xRaw) return; // not sure if this is possible?
const [start, end] = eventPayload.range;
const range = [convertToTimestamp(start), convertToTimestamp(end)];
Expand Down

0 comments on commit 50dac66

Please sign in to comment.