diff --git a/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx b/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx index 8c9bbd4085179..679f3a44bb60e 100644 --- a/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx +++ b/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx @@ -32,7 +32,6 @@ export interface ToolbarPopoverProps { */ groupPosition?: ToolbarButtonProps['groupPosition']; buttonDataTestSubj?: string; - larger?: boolean; } export const ToolbarPopover: React.FunctionComponent = ({ @@ -42,17 +41,15 @@ export const ToolbarPopover: React.FunctionComponent = ({ isDisabled = false, groupPosition, buttonDataTestSubj, - larger, }) => { const [open, setOpen] = useState(false); const iconType: string | IconType = typeof type === 'string' ? typeToIconMap[type] : type; - const panelClassName = larger ? 'lnsXyToolbar__popoverLarger' : 'lnsXyToolbar__popover'; return ( ) { )} condition={isValueLabelsDisabled} > - {i18n.translate('xpack.lens.shared.chartValueLabelVisibilityLabel', { - defaultMessage: 'Labels', - })}{' '} - {isValueLabelsDisabled ? ( - - ) : null} + + {i18n.translate('xpack.lens.shared.chartValueLabelVisibilityLabel', { + defaultMessage: 'Labels', + })}{' '} + {isValueLabelsDisabled ? ( + + ) : null} + } > @@ -292,46 +299,37 @@ export function XyToolbar(props: VisualizationToolbarProps) { }} /> - - {i18n.translate('xpack.lens.xyChart.missingValuesLabel', { - defaultMessage: 'Missing values', - })}{' '} - {!hasNonBarSeries ? : null} - - } - > - { - return { - value: id, - dropdownDisplay: ( - <> - {title} - -

{description}

-
- - ), - inputDisplay: title, - }; + {hasNonBarSeries ? ( + setState({ ...state, fittingFunction: value })} - itemLayoutAlign="top" - hasDividers - /> - + > + { + return { + value: id, + dropdownDisplay: ( + <> + {title} + +

{description}

+
+ + ), + inputDisplay: title, + }; + })} + valueOfSelected={state?.fittingFunction || 'None'} + onChange={(value) => setState({ ...state, fittingFunction: value })} + itemLayoutAlign="top" + hasDividers + /> +
+ ) : null}