superset icon indicating copy to clipboard operation
superset copied to clipboard

d3 formatting not working

Open duffar12 opened this issue 7 years ago • 9 comments

Expected results

Number formatting on dashboard should change according to d3 format specified in metrics

Actual results

Specifying a d3 format works on the COUNT(*) metric. But has no affect on any other metric as far as I can tell

Screenshots

image

In the image above COUNT(*) and SUM(count) have the same d3 format configured. However, the configuration is not being applied to SUM(count)

How to reproduce the bug

  1. Change the d3 format of COUNT(*) and any other metric for one of your tables
  2. Create a table view of these two metrics.
  3. Notice that d3 formatting is only applied to the COUNT(*) metric

Environment

*superset version: 0.33.0 *python version: 3.6.8

Checklist

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 there are 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.

Additional context

I have seen a number of other Issues raised around d3 formatting dating back to 2017. As far as I can tell those issues were fixed in this PR https://github.com/apache/incubator-superset/pull/2598 So I believe this must be a new bug

duffar12 avatar Jun 05 '19 16:06 duffar12

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.91. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jun 05 '19 16:06 issue-label-bot[bot]

@kristw any ideas about how to fix this?

duffar12 avatar Jun 28 '19 11:06 duffar12

Same problem on Pie Chart, D3 Format not work TLPic_20190708202346

Orchild avatar Jul 08 '19 12:07 Orchild

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Sep 06 '19 12:09 stale[bot]

@kristw same issues here. please don't close this issue.

crazyplum avatar Nov 08 '19 08:11 crazyplum

FWIW, I managed to get D3 formatting to work in the Table component for other metrics besides COUNT(*) as you can see in this (admittedly odd looking) example:

image

Nonetheless, I also see/confirm that this formatting value is not represented in the Pie chart (or probably other NVD3-derived chart types).

rusackas avatar Nov 14 '19 00:11 rusackas

@rusackas There is an incomplete PR, which maybe related, if anybody feels like picking up. https://github.com/apache-superset/superset-ui-plugins/pull/171

kristw avatar Nov 14 '19 00:11 kristw

PRs to respect the metrics' D3 Format value submitted here: https://github.com/apache-superset/superset-ui-plugins/pull/280 and here: https://github.com/apache-superset/superset-ui-plugins/pull/282

rusackas avatar Dec 04 '19 06:12 rusackas

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Feb 02 '20 06:02 stale[bot]