kurkle / chartjs-chart-treemap

Chart.js module for creating treemap charts
MIT License
139 stars 34 forks source link

Add includeInvisible option to interaction to manage negative spacing options #148

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

Fix #146.

This PR is also raising the minimum version of CHART.JS to 3.8.0, where includeInvisible option has been added to interaction.

stockiNail commented 2 years ago

@kurkle I have a doubt if it's a breaking change, due to new minimum needed CHART.JS version.

stockiNail commented 2 years ago

This still bothers me a little, because those rects are visible. I think in Chart.js interactions it's assumed that x/y are the center point of the element, which is not always the case.

I think CHART.JS is checking that whole rect (or shape) is in the chart area. Maybe it could check if a part of the element is in area to go on, instead of whole element.