diff --git a/README.md b/README.md index b3be204..76ed0f2 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ A data point has to have a `.feature` property containing the feature to render - US map: https://www.npmjs.com/package/us-atlas - World map: https://www.npmjs.com/package/world-atlas -- individual countries: https://github.com/markmarkoh/datamaps/tree/main/src/js/data (untested) +- individual countries: https://github.com/markmarkoh/datamaps/tree/master/src/js/data (untested) - topojson collection: https://github.com/deldersveld/topojson (untested) ```js diff --git a/package.json b/package.json index d83cb10..fc735a3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "chartjs-chart-geo", "description": "Chart.js module for charting maps", - "version": "4.1.0", + "version": "4.1.1", "author": { "name": "Samuel Gratzl", "email": "sam@sgratzl.com", diff --git a/src/scales/SizeScale.ts b/src/scales/SizeScale.ts index 3a0ee57..ba7ef7b 100644 --- a/src/scales/SizeScale.ts +++ b/src/scales/SizeScale.ts @@ -73,8 +73,9 @@ export class SizeScale extends LegendScale ({ [isHor ? 'x' : 'y']: el.translation[isHor ? 0 : 1] })) + const labelItems = this.getLabelItems(); + const positions = labelItems + ? labelItems.map((el: any) => ({ [isHor ? 'x' : 'y']: el.options.translation[isHor ? 0 : 1] })) : values.map((_, i) => ({ [isHor ? 'x' : 'y']: this.getPixelForTick(i) })); ((this as any)._gridLineItems || []).forEach((item: any) => {