Skip to content

Commit

Permalink
chore(wordcloud): remove tooltip (opensearch-project#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kati-dev-hu authored Mar 29, 2021
1 parent fd910a5 commit 363ed25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ import React from 'react';
import { ChartTypes } from '../..';
import { DEFAULT_CSS_CURSOR } from '../../../common/constants';
import { LegendItem } from '../../../common/legend';
import { Tooltip } from '../../../components/tooltip';
import { InternalChartState, GlobalChartState, BackwardRef } from '../../../state/chart_state';
import { InternalChartState, GlobalChartState } from '../../../state/chart_state';
import { InitStatus } from '../../../state/selectors/get_internal_is_intialized';
import { LegendItemLabel } from '../../../state/selectors/get_legend_items_labels';
import { DebugState } from '../../../state/types';
import { Dimensions } from '../../../utils/dimensions';
import { EMPTY_TOOLTIP } from '../../partition_chart/layout/viewmodel/tooltip_info';
import { Wordcloud } from '../renderer/svg/connected_component';
import { isTooltipVisibleSelector } from './selectors/is_tooltip_visible';
import { createOnElementClickCaller } from './selectors/on_element_click_caller';
import { createOnElementOutCaller } from './selectors/on_element_out_caller';
import { createOnElementOverCaller } from './selectors/on_element_over_caller';
import { getTooltipInfoSelector } from './selectors/tooltip';
import { getSpecOrNull } from './selectors/wordcloud_spec';

const EMPTY_MAP = new Map();
Expand Down Expand Up @@ -84,25 +82,20 @@ export class WordcloudState implements InternalChartState {
return EMPTY_MAP;
}

chartRenderer(containerRef: BackwardRef) {
return (
<>
<Tooltip getChartContainerRef={containerRef} />
<Wordcloud />
</>
);
chartRenderer() {
return <Wordcloud />;
}

getPointerCursor() {
return DEFAULT_CSS_CURSOR;
}

isTooltipVisible(globalState: GlobalChartState) {
return { visible: isTooltipVisibleSelector(globalState), isExternal: false };
isTooltipVisible() {
return { visible: false, isExternal: false };
}

getTooltipInfo(globalState: GlobalChartState) {
return getTooltipInfoSelector(globalState);
getTooltipInfo() {
return EMPTY_TOOLTIP;
}

getTooltipAnchor(state: GlobalChartState) {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 363ed25

Please sign in to comment.