Leaflet.Elevation icon indicating copy to clipboard operation
Leaflet.Elevation copied to clipboard

Fill chart with different colors based on intervals

Open corinat opened this issue 8 years ago • 2 comments

Hello,

Has anyone tried to fill the chart with different colors based on some values? Something like this? http://plnkr.co/edit/73RgBkbrml6CBA143FCf?p=preview If anyone could give some hints where I should do some changes, it would be much appreciated.

corinat avatar Sep 07 '16 12:09 corinat

I think the graph would need to be rendered in pieces, for each color. This would be mayor changes to the code.

MrMufflon avatar Sep 29 '16 18:09 MrMufflon

I might try something here if one of my clients confirms he's wanting it. Might take awhile but here's what I would do :

Calculate intervals (might be forced if needed, then fill the background with a linear gradient, as seen on: https://stackoverflow.com/questions/17053043/create-a-svg-rectangle-filled-with-different-background-color-by-percentage-or-p

HugoHeneault avatar Feb 07 '19 14:02 HugoHeneault