You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/10/04 11:43:12 UTC

[GitHub] vtyr opened a new issue #3592: Unable to concatenate d3 formula

vtyr opened a new issue #3592: Unable to concatenate d3 formula 
URL: https://github.com/apache/incubator-superset/issues/3592
 
 
   - [x] I have checked the superset logs for python stacktraces and included it here as text if any
   - [x] I have reproduced the issue with at least the latest released version of superset
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar
   
   I'm unsure if there is a particular way to format percentages (I've asked around) - but we usually concatenate a symbol on to a d3 formula, such as:
   
   `var numbers = [0.7, 0.75, 0.9, 1.2, 1.21];
   var format = d3.format(".2f")
   numbers.forEach(function(d){
       console.log(format(d)+ "%")
   })`
   
   However, SuperSet does not take code, rather a string to format numbers. This leads to the problem of rounding on percentages when not needed.
   
   ### Superset version
   0.18.5
   
   ### Expected results
   Percentage formatting without rounding to the decimal - ie. 1.2 -> 1.20%
   
   ### Actual results
   Currently unable to have decimal place percentages without rounding (to my knowledge)
   
   ### Steps to reproduce
   .2f returns 1.20
   % returns 12%
   
 
----------------------------------------------------------------
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