mapboxgl-powerbi icon indicating copy to clipboard operation
mapboxgl-powerbi copied to clipboard

Allow the setting of data colours for Choropleth shapes using a text field or measure

Open Mike-Honey opened this issue 6 years ago • 3 comments

Please extend the Mapbox Custom Visual to allow the setting of data colours for Choropleth shapes using a text field or measure that returns a text result. The text field or measure would present a hex color code e.g. #FD6666.

Power BI already supports this for table/matrix visuals, for setting cell & font colours: https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-formatting-by-field-value

This would help the typical requirement from apps like Miradi where particular status values have associated colors, e.g. Status=Poor is a particular shade of red.

Mike-Honey avatar Aug 29 '18 08:08 Mike-Honey

@Mike-Honey I understand the conditional formatting for colors which will allow the user to set bands of values and colors associated with each band. But for something like Status = Poor is a particular shade of red, could you use the Data Colors functionality? I think you referenced it in this ticket to make documentation for this feature (we we are in the process of doing) https://github.com/mapbox/mapboxgl-powerbi/issues/197

samgehret avatar Aug 30 '18 00:08 samgehret

@samgehret - that works but only for one visual instance. If you need multiple Mapbox visuals you would have to repeat setting the colors. Also with the current Data Colors functionality, every status value needs to be present in the data to allow setting it's color. Sure thats the way most visuals and custom visuals work, but it is problematic.

Mike-Honey avatar Sep 22 '18 14:09 Mike-Honey

This issue and https://github.com/mapbox/mapboxgl-powerbi/issues/266 seem fairly similar and can probably be consolidated. Obviously 266 was posted after 217 but it now has more details, so maybe 217 can be marked as duplicate?

otravers avatar Jul 21 '19 16:07 otravers