[openstreetmap/openstreetmap-website] Change heatmap color to linear from 0 to max changes (PR #5833)
Marwin Hochfelsner
notifications at github.com
Fri Mar 21 09:27:48 UTC 2025
@hlfan commented on this pull request.
> + domain: [0, heatmapData.reduce((max, item) => {
+ return item.total_changes > max ? item.total_changes : max;
+ }, 0)]
I think the 20 % performance loss is worth going for the more concise option:
```suggestion
domain: [0, Math.max(...heatmapData.map(d => d.total_changes)), 0)]
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5833#pullrequestreview-2705264022
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5833/review/2705264022 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250321/d3b315f5/attachment.htm>
More information about the rails-dev
mailing list