Skip to content

Commit b81ac73

Browse files
committed
fix heatmap legend
1 parent b479327 commit b81ac73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/graphs/HeatMap.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ const HeatMapChart = ({ title, data, columns }: HeatMapChartProps) => {
152152
'transform',
153153
`translate(${legendWidth - 50 + barWidth * data.length},0)`
154154
);
155-
const legendBarWidth = Math.abs(
156-
legendBar.node()!.getBoundingClientRect().x
157-
);
158155
svg.append('g')
159-
.attr('transform', `translate(${legendBarWidth + 10})`)
156+
.attr(
157+
'transform',
158+
`translate(${legendWidth - 50 + barWidth * data.length + 20})`
159+
)
160160
.datum(expandedDomain)
161161
.call(axisLabel)
162162
.select('.domain')

0 commit comments

Comments
 (0)