question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pie Chart - format number display from .3s to .1s ( or other format )

See original GitHub issue

Make 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

piechart 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:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mistercrunchcommented, Feb 19, 2018

I recommend using npm run dev-fast, we should make that the default…

1reaction
raffascommented, Feb 14, 2018

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

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found