starschema / mapboxgl-powerbi

Mapbox Visual for Power BI - High performance, custom map visuals for Power BI dashboards
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381472?tab=Overview
MIT License
34 stars 9 forks source link

[BUG] - "layers.circle.paint.circle-color: Expected at least 4 arguments, but found only 2." When non-existent combination of dashboard interaction and slicer selected #93

Open garrettellison opened 8 months ago

garrettellison commented 8 months ago

Describe the bug When a dashboard is created with slicers, and visuals that can interact with the map, we need a graceful handling of non-existent data contexts. When a user may accidentally select a bad combination on the dashboard, they are presented with an unfriendly error message, rather than the map. "layers.circle.paint.circle-color: Expected at least 4 arguments, but found only 2."

The inherent challenge in trying to account for this error in the current state is that power bi cannot in-turn filter slicer selections based on dashboard interaction cross-filter selections.

To Reproduce Steps to reproduce the behavior:

  1. Click a dashboard element to interact/cross-filter across the dashboard (for example, in a table, select a project that exists in Louisiana, which then properly filters all dashboard elements, including the dashboard to Louisiana project data.
  2. Select a Slicer value that does not exist in the data model. (for example, we already have a Louisiana project selected in a table viz, so now choose "California" from the "State" slicer.
  3. The map then blanks-out, and displays the error message: "layers.circle.paint.circle-color: Expected at least 4 arguments, but found only 2." I'm assuming this is because this data does not exist and there is no graceful handling of this situation.

Expected behavior It would be better if the map instead reverted to the default view or loaded with no plots instead. I understand that this is outside usual use-cases, and the users should know that the selections they're making make no sense, but a user could still accidentally click around and stumble across this, as I did.

Screenshots image image

Additional context None