Pie Chart - format number display from .3s to .1s ( or other format )
See original GitHub issueMake sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if any
- I have reproduced the issue with at least the latest released version of superset
- 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
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)}
);
}
But the pie charts are still displaying the decimals Do I need to change anything else? Thanks in adv.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Pie Chart - format number display from .3s to .1s ( or ... - GitHub
My data are whole integers in my query. Having decimals does not make sense in this case. I made search in the source...
Read more >Pie Chart - format number display from .3s to .1s ( or other ...
My pie chart is displaying unwanted decimal values (not present in the initial data or query). The decimal values are not accurate in...
Read more >Change the format of data labels in a chart - Microsoft Support
You can format the labels to show specific labels elements like, the percentages, series name, or category name. Pie chart with data labels...
Read more >How to Create Pie of Pie Chart in Excel? - GeeksforGeeks
The pie of pie chart is a chart with two circular pies displaying the data ... right Click on the second pie and...
Read more >Re: How do you change the data label number format...
click on a chart then click on the paint brush icon ( on the Visualizations section on the right) to see the formatting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I recommend using
npm run dev-fast
, we should make that the default…You need to use the development version. Files in the assets folder are managed by webpack. You cannot modify using the production server (or debug server). They are minified and Superset loads it from the dist/ subdir, not from the assets directory
See https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md on how to setup.
Maybe an options to .1s can be added in the control defined in assets/javascripts/explore/stores/controls.jsx so it its available for anyone