Skip to content

Commit

Permalink
chore: move tooltip prosition in stacked progress plot for activity p…
Browse files Browse the repository at this point in the history
…rogress
  • Loading branch information
sjschlapbach committed Dec 20, 2024
1 parent 71b0e14 commit ba45ba4
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,7 @@ function StackedProgress({
tickCount={5}
/>
<YAxis type="category" hide />
<Bar dataKey="repeated" stackId="a" fill={colors.repeated} />
<Bar dataKey="completed" stackId="a" fill={colors.completed} />
<Bar dataKey="started" stackId="a" fill={colors.started} />
<Bar dataKey="full" stackId="a" fill="#f0f0f0" />
<ReferenceLine x={25} stroke="#666" strokeDasharray="3 3" />
<ReferenceLine x={50} stroke="#666" strokeDasharray="3 3" />
<ReferenceLine x={75} stroke="#666" strokeDasharray="3 3" />
<Tooltip
cursor={{ fill: '#ffffff00' }}
wrapperStyle={{ zIndex: 20 }}
content={({ payload }) => {
if (!payload?.length) return null
Expand All @@ -97,6 +89,13 @@ function StackedProgress({
)
}}
/>
<Bar dataKey="repeated" stackId="a" fill={colors.repeated} />
<Bar dataKey="completed" stackId="a" fill={colors.completed} />
<Bar dataKey="started" stackId="a" fill={colors.started} />
<Bar dataKey="full" stackId="a" fill="#f0f0f0" />
<ReferenceLine x={25} stroke="#666" strokeDasharray="3 3" />
<ReferenceLine x={50} stroke="#666" strokeDasharray="3 3" />
<ReferenceLine x={75} stroke="#666" strokeDasharray="3 3" />
</BarChart>
</ResponsiveContainer>
</div>
Expand Down

0 comments on commit ba45ba4

Please sign in to comment.