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

Group by text displayed in some charts is truncated #395

Closed
madalincm opened this issue May 9, 2018 · 6 comments · Fixed by #422
Closed

Group by text displayed in some charts is truncated #395

madalincm opened this issue May 9, 2018 · 6 comments · Fixed by #422
Assignees
Milestone

Comments

@madalincm
Copy link

Steps to Reproduce:

  1. Open https://pipeline-sql.stage.mozaws.net/queries/374#460
  2. Hover over any of the bars in chart

Expected results:
All the information are displayed completely. For example when hovering over the blue bar the text: "App 2.0.1 - Android 22" is correctly displayed

Actual results:
When hovering over the blue bar the ""App 2.0.1 - Android 22"" text is truncated and only "App 2.0.1 - ..." is displaued

Notes/Issues:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Verified in FF59(Win7). Issue can be reproduced in STMO-stage and STMO-prod
Production query where this issue can be reproduced: https://sql.telemetry.mozilla.org/queries/52806#140500
Screencast for this issue:
truncatedtext

@madalincm madalincm added the bug label May 9, 2018
@rafrombrc rafrombrc modified the milestones: 13.4, 14 May 23, 2018
@alison985 alison985 self-assigned this May 30, 2018
@alison985
Copy link

I can reproduce this issue on redash v4.0.1+b838f28f if there are multiple series. On single series bar charts it doesn't even try to display the label.

In order to see the HTML generated on hover you have to use Chrome and the "Break on > subtree modifications" feature. That points you to the d3.js file.

Plotly.js supports hover text: https://plot.ly/javascript/bar-charts/#bar-chart-with-hover-text
I forked the codepen example and changed the plotly.js down to our version - 1.20.1 here: https://codepen.io/plotly/pen/c11f764ad9de0a40f3f4989517195cf0 (it's not saving the version change) It does allow untruncated labels to be passed into the text parameter.

Adding the text parameter and the name of the series to the plotlySeries in javascript (utils.js) does not fix the issue. hoverinfo and hovertext also do not fix the issue.

Searching for '...', which is what is being appended to each label after truncation does not result in any leads.

@madalincm
Copy link
Author

Verified in FF60(Win7) in stmo-stage
The original issue appears to be fixed, the entire string is displayed:
truncatedstring

But as can be observed in the above screenshot there is a problem with the text alignment.
I will mark this issue as verified fixed an open an new one to track that.

@jezdez
Copy link

jezdez commented Jun 21, 2018

Reopening since we decided to roll back #422 following a discussion with @emtwo on IRC about #437.

The real culprit seems to be a missing feature in plotly (plotly/plotly.js#460) and the best I was able to get to was:

em25uoxads8m0cq1wzhuvm234fc18ogo-medium

I'm really wondering if it's not enough to have the full label in the legend next to the graph?

@madalincm
Copy link
Author

@jezdez Having the value is what really counts so I agree with you that having the label correctly displayed next to the graph should be ok for now.

@alison985
Copy link

@jezdez Are we closing as won't fix?

@jezdez
Copy link

jezdez commented Jun 22, 2018

@alison985 Yeah, with @madalincm's reply above I think we can close this. At least until plotly/plotly.js#460 is fixed.

@jezdez jezdez closed this as completed Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants