diff --git a/components/PieChart.module.css b/components/PieChart.module.css index 5c85fd3..800692e 100644 --- a/components/PieChart.module.css +++ b/components/PieChart.module.css @@ -2,7 +2,16 @@ fill: #354265; } -.path:hover { +.text { + display: none; + fill: white; +} + +.group:hover>.path { fill: #EF839D; - filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, .7)); + filter: drop-shadow(0px 0px 6px #CC5773); +} + +.group:hover>.text { + display: inline } \ No newline at end of file diff --git a/components/PieChart.tsx b/components/PieChart.tsx index 02a2258..0342ddb 100644 --- a/components/PieChart.tsx +++ b/components/PieChart.tsx @@ -50,13 +50,14 @@ export function PieSlice(props: PieSliceProps) { const pathArc = props.path(arc); return ( - - + + {`${arc.data.value} %`} + >{`${arc.data.value}%`} ); });