You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/01/10 23:06:38 UTC

[GitHub] betodealmeida opened a new pull request #6631: Truncate long labels in x axis

betodealmeida opened a new pull request #6631: Truncate long labels in x axis
URL: https://github.com/apache/incubator-superset/pull/6631
 
 
   The padding for NVD3 charts is computed based on the length of the longest label in axes. For datasets with really long labels this results in excessive padding.
   
   I added code to truncate the labels that are longer than 24 characters. Note that this has to be done twice: first when computing the length of the longest label, and again after the chart has been redrawn.
   
   An example with `MAX_LABEL_LENGTH` set to 8:
   
   <img width="581" alt="screen shot 2019-01-10 at 3 01 39 pm" src="https://user-images.githubusercontent.com/1534870/51002628-bdc0ad00-14e8-11e9-9e66-d599dd0ad9a5.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org