CitiLogics / citilogics-geoloop-panel

Animated Maps in Grafana
MIT License
44 stars 6 forks source link

Add support for opacity & hiding features with no data #10

Closed michaeldejong closed 5 years ago

michaeldejong commented 5 years ago

First of all, really like the plugin 👍 . Took a while to figure out how to get it to work with our PostgreSQL datasources, but finally managed to get this up and running. This might just be the thing for us when trying to visualise our data region by region. I did notice three things (also mentioned in some issues) that made it slightly unusable for us:

Here's what this looks like:

opacity

screen shot 2018-08-01 at 14 24 08

Please note that in this case we have features / regions defined for the entire country, but only these 3 regions show up because that's what the query results return. If we disable the "Hide features with no data" option, the rest of the map will turn black.

Maybe in the future we would also like to add support for simpler gradients or fixed colors where the opacity is adjusted to the value, since that makes more sense for our data. But I figured that's for another PR sometime in the future.

Also note that javascript isn't really my thing, so I might have goofed somewhere without knowing. Please let me know if I need to make adjustments.

samhatchett commented 5 years ago

This is AWESOME! Great additions, and great feedback. I will review as soon as I get a few minutes. JS isn’t really my thing either, so we must tread lightly!