Skip to content

Implement arrayOk textposition for scatter3d traces #2872

Closed

Description

@jonmmease

Second issue reported in plotly/plotly.py#1055

CodePen: https://codepen.io/anon/pen/EpRrVq

When the textposition property of the scatter3d trace is set to "middle left", the text position responds as expected:

textposition: "middle left"

screen shot 2018-08-04 at 7 17 23 am

However, when the textposition property is set to an array of valid strings, the positions are ignored:

textposition: ['top center', 'middle left', 'bottom center', 'middle right']

screen shot 2018-08-04 at 7 17 36 am

I checked the schema and the arrayOk property is set to true for this property. Also, this array of textposition values works as expected for the 2d scatter trace.

Activity

  1. etpinard commented on Aug 7, 2018

    @etpinard
    Contributor

    Looks like arrayOk support for textposition in scatter3d trace never got implemented:

    params.textOffset = calculateTextOffset(data.textposition); // arrayOk === false
    params.textColor = formatColor(data.textfont, 1, len);
    params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
    params.textFont = data.textfont.family; // arrayOk === false
    params.textAngle = 0;

    I'll make a quick PR to update the attributes accordingly, but I'll tag this ticket as a feature request.

  2. added
    feature
    on Aug 7, 2018
  3. changed the title [-]Scatter3d textposition array ignored[/-] [+]Implement arrayOk textposition for scatter3d traces[/+] on Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions