Skip to content

Can't set 'colorbar' parameters in layout.template.data.{trace}[i].{line|marker} #4467

Description

@wbrgss

Setting colorbar parameters doesn't appear to work in layout.template.data.{trace_type}[i].{line|marker}.

Related: #3100 (comment), to quote @etpinard:

As for the colorbar part, the problem comes from the colorbar defaults call:

if(showScale) colorbarDefaults(containerIn, containerOut, layout);

where containerOut is fullData[i] for heatmap, but is fullData[i].marker for scatter and other marker colorscales. Colorbar templates propagate correctly (using Template.newContainer) from fullData[i], but not from marker containers. Adding

image

should be enough to fix this, but we should look for other situations where supply-defaults subroutines are called with trace sub-containers.


I'm not sure the above suggested fix was ever implemented.

This codepen demonstrates the issue with ypad:
https://codepen.io/wbrgss/pen/NWPXEPG

I logged a separate issue related to #3100 in #4466

Activity

  1. wbrgss commented on Jan 6, 2020

    @wbrgss
    ContributorAuthor

    To be more specific, I've noticed this for line as well as marker colorscales, including scatter but also parcats and splom.

  2. etpinard commented on Jan 7, 2020

    @etpinard
    Contributor

    Thanks for pointing this out.

    I botched 6a47d66 for colorbar containers.


    Please note that line colorscales are not supported in scatter lines (they are in marker.line) and that splom traces only support markers.

  3. self-assigned this
    on Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions