Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional auto-generated legend #210

Closed
otravers opened this issue Aug 5, 2018 · 7 comments

Comments

Projects
4 participants
@otravers
Copy link

commented Aug 5, 2018

It would be great to have the option to display a legend that explains what Circle Color / Size, Choropleth Color, or Cluster Grouping are driven by. Below is a example taken from this page:

image

This is simpler than what I'd like to see in Mapbox because there's no color-coding. Multivariate symbols are discussed here and here.

@ryanbaumann

This comment has been minimized.

Copy link
Collaborator

commented Aug 5, 2018

Agree @otravers. Would a legend palette similar to what is in Mapboxgl-Jupyter work here mapbox/mapboxgl-jupyter#100 (comment)?

Would you need the legend placed on top of the viz? Or ideally could you move the legend to another viz element?

@otravers

This comment has been minimized.

Copy link
Author

commented Aug 5, 2018

@ryanbaumann yes what you've been working on in Mapboxgl-Jupyter is right on the money. Indeed it would be fantastic if the legend was a movable object. Even more awesome would be the ability to only display the legend in its own chart in the PBI canvas, so that it's effectively the legend to the whole dashboard.

@samgehret samgehret added this to To do in 1.4 via automation Oct 17, 2018

@samgehret

This comment has been minimized.

Copy link
Contributor

commented Nov 7, 2018

Implementation (work in progress)

  • A legend option would need to be added for each layer type: circle, cluster, heatmap, and choropleth. It should be a toggle on/off. The toggle should be under each layer type settings.
  • Ideally the legend will only show up if the layer is also visible. For example, heatmap is set from zoom 0-12, and circle is set from zoom 13-22. In this case the legend for heatmap should show up from 0-12 and the circle legend should show up from 13-22
  • Choropleth / Extrusion should be the MVP: It should have a legend to explain the colors, and also explain the heights. It should also contain the metric name as well. For example:
    image

I have created a POC of this feature in the branch for legend_poc

It looks like this:
image

@samgehret

This comment has been minimized.

Copy link
Contributor

commented Jan 10, 2019

Acceptance Criteria:

  • When the layer option is toggled on for any layer type it will be shown in the bottom right of the map.
  • Use a style similar to the screenshot above from the POC Branch
  • Choropleth has a legend control for color only, no extrusion legend
  • Circle Layer has a legend control, indicating color only
  • Cluster layer has a legend control, indicating color only
  • Legend should only appear if the associated layer is visible (from the min / max zoom in each layer setting.

Nice to have:

  • Heatmap layer has a legend control for color. We can show a color gradient for the legend. on the left side will say less some metric name and on the right side will say more some metric name
  • Circle and Cluster layer has a legend control for size.

@petispaespea petispaespea moved this from To do to In progress in 1.4 Jan 25, 2019

@petispaespea petispaespea self-assigned this Jan 25, 2019

@petispaespea petispaespea moved this from In progress to QA in 1.4 Jan 25, 2019

@samgehret samgehret moved this from QA to Done in 1.4 Feb 14, 2019

@samgehret

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2019

This feature is live in the marketplace

@samgehret samgehret closed this Mar 18, 2019

@otravers

This comment has been minimized.

Copy link
Author

commented Mar 25, 2019

Awesome @samgehret, thanks! Should I create new issues for the remaining nice-to-haves in your list?

@samgehret

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

@otravers Absolutely! We love getting your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.