Skip to content

Commit

Permalink
fix(charts): resolved issues created from merging histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjeevLakhwani committed May 29, 2024
1 parent 0355e00 commit fd3692f
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 fd3692f

Please sign in to comment.