Do you know how to override group level opacity at the element level? For example, I would expect the following code to set rectangle opacity to 1 but it remains 0.5.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<script src="https://d3js.org/d3.v6.min.js"></script>
<script>
let svg = d3.select("body").append("svg")
let group= svg.append("g").attr("opacity", 0.5) // group level
group.append("rect")
.attr("height", 50)
.attr("width", 50)
.attr("opacity", 1) // element level
</script>
</body>
</html>
But if I interchange 0.5 and 1, it works fine!