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

Multiline gl2d texts #1089

Merged
merged 1 commit into from
Oct 26, 2016
Merged

Multiline gl2d texts #1089

merged 1 commit into from
Oct 26, 2016

Conversation

monfera
Copy link
Contributor

@monfera monfera commented Oct 26, 2016

PR depends on the merge and npm publish of its gl-vis dependency

Purports to fix #1079

// TODO add support for '\n' in gl-plot2d,
// For now, replace '\n' with ' '
nextTicks[j][i].text = convertHTMLToUnicode(nextTicks[j][i].text + '').replace(/\n/g, ' ');
nextTicks[j][i].text = convertHTMLToUnicode(nextTicks[j][i].text + '');
Copy link
Contributor

Choose a reason for hiding this comment

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

why the extra + '' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was there and I left it intact, thinking it was in place to coerce it into a string

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe nextTicks[j][i].text will always be a string. Let's 🔪 that + ''.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@etpinard npm run test-image-gl2d returned with errors when I did the 🔪

Copy link
Contributor

Choose a reason for hiding this comment

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

Ha. Good to know. Revert the 🔪 and add a comment about the + ''.

@monfera monfera force-pushed the multiline branch 3 times, most recently from ef66311 to b4a21d3 Compare October 26, 2016 22:46
@etpinard etpinard added bug something broken status: reviewable labels Oct 26, 2016
@etpinard etpinard added this to the v1.19.0 milestone Oct 26, 2016
@etpinard
Copy link
Contributor

Awesome work @monfera

Thanks very much!

@etpinard etpinard merged commit cbd6b87 into plotly:master Oct 26, 2016
@monfera monfera deleted the multiline branch October 26, 2016 23:26
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 this pull request may close these issues.

The WebGL scatter plots should support multiline date axis tick labels
2 participants