Skip to content

geo.visible vs template...showland #4482

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

Closed
nicolaskruchten opened this issue Jan 10, 2020 · 8 comments · Fixed by #4483
Closed

geo.visible vs template...showland #4482

nicolaskruchten opened this issue Jan 10, 2020 · 8 comments · Fixed by #4483
Assignees
Labels
bug something broken

Comments

@nicolaskruchten
Copy link
Contributor

Right now, layout.geo.visible=false doesn't override layout.template.layout.geo.showland=true but it should.

@nicolaskruchten nicolaskruchten added the bug something broken label Jan 10, 2020
@archmoj
Copy link
Contributor

archmoj commented Jan 10, 2020

Bug demo

@alexcjohnson
Copy link
Collaborator

Hmm this is a bit of a tricky case but I think you're right to consider it a bug. We have two inheritance pathways: the more-specific value from the template and the more-general value set explicitly, and normally the template wins but here we want the explicit-but-general value to win. I'm wondering if there are other cases like this - for example, should layout.xaxis.color beat out layout.template.layout.xaxis.linecolor to determine final fullLayout.xaxis.linecolor?

An additional wrinkle though: what if you set BOTH in the template and NEITHER in the main layout? ie layout.template.layout.geo.showland=true and layout.template.layout.geo.visible=false and you don't set layout.geo.visible or layout.geo.showland? We need to ensure that in this case showland will end up true, so we can't even trust the coerced value of fullLayout.geo.visible

@nicolaskruchten
Copy link
Contributor Author

Yes, agreed that it's tricky.

Agreed that layout.template.layout.geo.visible=false and layout.template.layout.geo.showland=true and layout.geo.visible=null and layout.geo.showland=null should result in land showing only IMO, so you can't use the "normal" machinery.

@archmoj
Copy link
Contributor

archmoj commented Jan 10, 2020

Should we override all these? Or only 'showland'?

'lonaxis.showgrid',
'lataxis.showgrid',
'showcoastlines',
'showocean',
'showland',
'showlakes',
'showrivers',
'showcountries',
'showsubunits',
'showframe'

@nicolaskruchten
Copy link
Contributor Author

all of the above except for *axis.showgrid I would think.

@archmoj
Copy link
Contributor

archmoj commented Jan 10, 2020

Why should we skip *axis.showgrid?

@nicolaskruchten
Copy link
Contributor Author

Ah I see that geo.visible currently impacts showgrid per 0909f33 so... OK for showgrid too.

@etpinard
Copy link
Contributor

I'm wondering if there are other cases like this - for example, should layout.xaxis.color beat out layout.template.layout.xaxis.linecolor to determine final fullLayout.xaxis.linecolor?

Did anyone look into axis.color and axis.visible behave in and out of templates?

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

Successfully merging a pull request may close this issue.

4 participants