You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/14 08:14:16 UTC

[GitHub] XavierDeLapeyre opened a new issue #4424: Pie Chart - format number display from .3s to .1s ( or other format )

XavierDeLapeyre opened a new issue #4424: Pie Chart - format number display from .3s to .1s ( or other format )
URL: https://github.com/apache/incubator-superset/issues/4424
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [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
   
   
   ### Superset version
   {"GIT_SHA": "", "version": "0.21.1"}
   
   ### Expected results
   ![piechart](https://user-images.githubusercontent.com/8424411/36192997-817e18f6-117d-11e8-8758-b7669ac08c7c.png)
   My data are whole integers in my query.
   Having decimals does not make sense in this case.
   
   I made search in the source codes and found some formatting in nvd3_vis.js
   and a pie chart case.
   
   
   ### Steps to reproduce
   env/lib/python2.7/site-packages/superset/static/assets/visualizations/nvd3_vis.js
   case 'pie':
   ...
      // chart.valueFormat(f);
      chart.valueFormat('.1s'); 
   ...
      else if (fd.pie_label_type === 'key_value') {
   		  //chart.labelType(d => `${d.data.x}: ${d3.format('.3s')(d.data.y)}`);
             chart.labelType(d => `${d.data.x}: ${d3.format('.1s')(d.data.y)}`); 
           }
   
   
   
   Do I need to change anything else?
   Thanks in adv.

----------------------------------------------------------------
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