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 legend itemsizing #3732

Merged
merged 5 commits into from
Apr 9, 2019
Merged

Add legend itemsizing #3732

merged 5 commits into from
Apr 9, 2019

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Apr 4, 2019

resolves #3727 - by adding legend.itemsizing with values 'constant' and 'trace' (the default and current behavior).

I chose itemsizing over sizemode as we already have a sizemode attribute in the scatter* traces which does something sufficiently different in my mind to not replicate the name over to layout.legend. Let me know if you can think of a better name.

cc @plotly/plotly_js @nicolaskruchten

@etpinard etpinard added this to the v1.47.0 milestone Apr 4, 2019
Copy link
Contributor

@archmoj archmoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard thanks for the PR.
Concerning those gl3d baseline changes, I am wondering if we may apply half of the sizes?

src/components/legend/style.js Show resolved Hide resolved
Copy link
Contributor

@archmoj archmoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love legend-constant-itemsizing baseline!
Few suggestions related to waterfall mock are:

test/image/mocks/legend-constant-itemsizing.json Outdated Show resolved Hide resolved
test/image/mocks/legend-constant-itemsizing.json Outdated Show resolved Hide resolved
@archmoj
Copy link
Contributor

archmoj commented Apr 5, 2019

@etpinard thanks for the PR.
Concerning those gl3d baseline changes, I am wondering if we may apply half of the sizes?

@etpinard In fact this PR solved the issue with those gl3d baselines I mentioned earlier. So there is nothing to worry there.

@archmoj
Copy link
Contributor

archmoj commented Apr 9, 2019

OK. My comments above were non-blocking.
💃
Another great PR @etpinard that would make many people happy.

@archmoj
Copy link
Contributor

archmoj commented Apr 9, 2019

Awesome.
💃

@etpinard etpinard merged commit 3523464 into master Apr 9, 2019
@etpinard etpinard deleted the legend-itemsizing branch April 9, 2019 17:02
@bulam
Copy link

bulam commented Apr 14, 2019

itemsizing = 'constant' doesn't seem to work in a 3D scatter plot. The legend item circles are still smaller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

legend.marker.sizemode
5 participants