spectriclabs / elastic_datashader

:earth_americas: Datashader enabled TMS server with ElasticSearch backend
Apache License 2.0
4 stars 1 forks source link

Toggle of "Show ellipses" causes ellipse color change which no longer aligns with legend #14

Closed ndmitch311 closed 1 year ago

ndmitch311 commented 2 years ago

Steps to reproduce: Add Datashader layer to Map Layer Style section Color : By Value Observe legend is correct for plot points. In Layer Style section change the "Render Mode" of "Show ellipses" to "on". Observe ellipse colors do not align with legend colors.

maihde commented 2 years ago

This appears to be due to the fact that the underlying data is an array instead of a single value. The actual data looks like this:

sender: [ "B2" ]

My guess is that tile/legend mode are flattening these arrays while ellipse mode is not. The running code in the system is on an older version as well df4ce9c390ff976b9e6afa649a8606de8fe77cd9

maihde commented 2 years ago

This line

https://github.com/spectriclabs/elastic_datashader/blob/8e2b46c6f722d12a772726979ea89e095b810a45/tms_datashader_api/helpers/tilegen.py#L254

Needs to change to

if not isinstance(v, (list, AttrList)):
mkellogg91 commented 2 years ago

I'm not able to reproduce this. When switching on the show ellipses mode I see no difference. I'm using the test flight sample data, I'm assuming in order to see this issue I need to use something else?