Skip to content

Commit

Permalink
Fix show legend in bar charts (#175)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <joshuali925@gmail.com>

Signed-off-by: Joshua Li <joshuali925@gmail.com>
  • Loading branch information
joshuali925 authored Jan 6, 2023
1 parent e3652ce commit b4491b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/components/visualizations/charts/bar/bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const Bar = ({ visualizations, layout, config }: any) => {
const tooltipText = tooltipOptions.tooltipText !== undefined ? tooltipOptions.tooltipText : 'all';
const barWidth = 1 - (chartStyles.barWidth || barwidth);
const groupWidth = 1 - (chartStyles.groupWidth || groupwidth);
const showLegend = legend.showLegend ?? showlegend;
const showLegend = legend.showLegend === 'hidden' ? false : showlegend;
const legendPosition = legend.position || legendposition;
const labelSize = chartStyles.labelSize || DEFAULT_BAR_CHART_STYLES.LabelSize;
const legendSize = legend.legendSize;
Expand Down Expand Up @@ -180,7 +180,7 @@ export const Bar = ({ visualizations, layout, config }: any) => {
},
}),
},
showlegend,
showlegend: showLegend,
hovermode: 'closest',
margin: PLOT_MARGIN,
};
Expand Down

0 comments on commit b4491b1

Please sign in to comment.