Skip to content

Commit

Permalink
remove special plot css class name as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Jul 26, 2023
1 parent 0cbd3d4 commit dfacb83
Showing 1 changed file with 14 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,6 @@ export function getPlotStyle(
}
}

const getClassNameForPlotDiv = (isExpanded: boolean, plotType: PlotType) => {
if (!isExpanded) {
return 'FacetNavPanel__body__plot'
}
return `FacetNavPanel__body__plot--expanded${
plotType === 'BAR' ? 'Bar' : 'Pie'
}`
}

const FacetNavPanel: React.FunctionComponent<FacetNavPanelProps> = (
props: FacetNavPanelProps,
): JSX.Element => {
Expand Down Expand Up @@ -462,26 +453,20 @@ const FacetNavPanel: React.FunctionComponent<FacetNavPanelProps> = (
>
<SizeMe monitorHeight noPlaceholder>
{({ size }) => (
<div className={getClassNameForPlotDiv(isModalView, plotType)}>
<Plot
key={`${facetToPlot.columnName}-${plotType}-${size.width}`}
layout={layout}
data={plotData?.data ?? []}
style={getPlotStyle(
size.width,
plotType,
isModalView ? 300 : 150,
)}
config={{ displayModeBar: false }}
onClick={evt =>
applyFacetFilter(
evt,
facetToPlot,
applyChangesToGraphSlice,
)
}
></Plot>
</div>
<Plot
key={`${facetToPlot.columnName}-${plotType}-${size.width}`}
layout={layout}
data={plotData?.data ?? []}
style={getPlotStyle(
size.width,
plotType,
isModalView ? 300 : 150,
)}
config={{ displayModeBar: false }}
onClick={evt =>
applyFacetFilter(evt, facetToPlot, applyChangesToGraphSlice)
}
/>
)}
</SizeMe>
<FacetPlotLegendList
Expand Down

0 comments on commit dfacb83

Please sign in to comment.