Skip to content

Commit

Permalink
Resolved issues created by merging histograms (#27)
Browse files Browse the repository at this point in the history
- corrected tooltip style variable name
- added ommitted responsive property to chart wrapper
  • Loading branch information
SanjeevLakhwani authored May 29, 2024
2 parents 0355e00 + fd3692f commit 5640a5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Components/Charts/BaseBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
YAxis,
} from 'recharts';
import {
TOOL_TIP_STYLE,
TOOLTIP_STYLE,
COUNT_STYLE,
LABEL_STYLE,
MAX_TICK_LABEL_CHARS,
Expand Down Expand Up @@ -75,7 +75,7 @@ const BaseBarChart: React.FC<BaseBarChartProps> = ({
// on formatting a non-string. This hack manually overrides the ticks for the axis and blanks it out.
// - David L, 2023-01-03
return (
<ChartWrapper>
<ChartWrapper responsive={typeof width !== 'number'}>
<div style={TITLE_STYLE}>{title}</div>
<ResponsiveContainer width={width ?? '100%'} height={height}>
<BarChart data={data} margin={BAR_CHART_MARGINS}>
Expand Down Expand Up @@ -125,7 +125,7 @@ const BarTooltip = ({
const percentage = totalCount ? Math.round((value / totalCount) * 100) : 0;

return (
<div style={TOOL_TIP_STYLE}>
<div style={TOOLTIP_STYLE}>
<p style={LABEL_STYLE}>{name}</p>
<p style={COUNT_STYLE}>
{value} ({percentage}%)
Expand Down

0 comments on commit 5640a5d

Please sign in to comment.