Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Oct 31, 2023
1 parent ff0c7c8 commit 2408dc2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const layeredXyVisFn: LayeredXyVisFn['fn'] = async (data, args, handlers)
syncTooltips: handlers?.isSyncTooltipsEnabled?.() ?? false,
syncCursor: handlers?.isSyncCursorEnabled?.() ?? true,
overrides: handlers.variables?.overrides as XYRender['value']['overrides'],
shouldShowLegendAction: handlers?.shouldShowLegendAction,
shouldShowLegendAction: handlers?.shouldShowLegendAction ?? (() => true),
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const xyVisFn: XyVisFn['fn'] = async (data, args, handlers) => {
syncTooltips: handlers?.isSyncTooltipsEnabled?.() ?? false,
syncCursor: handlers?.isSyncCursorEnabled?.() ?? true,
overrides: handlers.variables?.overrides as XYRender['value']['overrides'],
shouldShowLegendAction: handlers?.shouldShowLegendAction,
shouldShowLegendAction: handlers?.shouldShowLegendAction ?? (() => true),
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/expressions/common/execution/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export interface ExecutionContext<
* Logs datatable.
*/
logDatatable?(name: string, datatable: Datatable): void;

shouldShowLegendAction?: (actionId: string) => boolean;
}

/**
Expand Down

0 comments on commit 2408dc2

Please sign in to comment.