Skip to content

Commit 4c57438

Browse files
authored
Merge pull request #105 from fabienpomerol/feature/fix-legend-colors
Fix #79 thresholds color legend
2 parents e94f9ec + 0b99e5c commit 4c57438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/worldmap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class WorldMap {
4848
'&lt; ' + thresholds[0] + '<br>';
4949
for (let index = 0; index < thresholds.length; index += 1) {
5050
legendHtml +=
51-
'<i style="background:' + this.getColor(thresholds[index] + 1) + '"></i> ' +
51+
'<i style="background:' + this.ctrl.panel.colors[index+1] + '"></i> ' +
5252
thresholds[index] + (thresholds[index + 1] ? '&ndash;' + thresholds[index + 1] + '<br>' : '+');
5353
}
5454
this.legend._div.innerHTML = legendHtml;

0 commit comments

Comments
 (0)