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

Implement arrayOk textposition for scatter3d traces #2872

Closed
jonmmease opened this issue Aug 4, 2018 · 1 comment · Fixed by #3200
Closed

Implement arrayOk textposition for scatter3d traces #2872

jonmmease opened this issue Aug 4, 2018 · 1 comment · Fixed by #3200
Labels
feature something new

Comments

@jonmmease
Copy link
Contributor

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.

@etpinard
Copy link
Contributor

etpinard commented Aug 7, 2018

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.

@etpinard etpinard added the feature something new label Aug 7, 2018
@etpinard etpinard changed the title Scatter3d textposition array ignored Implement arrayOk textposition for scatter3d traces Aug 7, 2018
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 a pull request may close this issue.

2 participants