sgratzl / chartjs-chart-geo

Chart.js Choropleth and Bubble Maps
https://www.sgratzl.com/chartjs-chart-geo/
MIT License
351 stars 40 forks source link

Wrong legend rendering with chart padding #252

Open hokolomopo opened 1 month ago

hokolomopo commented 1 month ago

When rendering a choropleth chart with a ColorScale legend, the display looks bugged if the chart has some padding. The color scale does not seems affected by the padding, but the values next to the color scale are.

To Reproduce

Codepen example

Expected behavior

I'd expect the color scale bar and the values to both respond to the chart padding.

Screenshots

image

Context

hokolomopo commented 1 month ago

In the same vein, It also display the legend inside the title at the top-left image