You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/02 19:09:28 UTC

[GitHub] [incubator-superset] SWoto opened a new issue #8913: Currency format D3

SWoto opened a new issue #8913: Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913
 
 
   I'm trying to set up the currency format in superset charts but it is always displayed in the American format. ($ 1,234.56)
   
   Tried the solution present in #3972 by @PeterCahn by changing the superset/assets/node_modules/d3-format/src/defaultLocale.js file to the desired one and didn't work for the currency problem.
   
   ``` 
     decimal: ",",
     thousands: ".",
     grouping: [3],
     currency: ["R$", ""],
     dateTime: "%d/%m/%Y %H:%M:%S",
     date: "%d/%m/%Y",
     time: "%H:%M:%S",
     periods: ["AM", "PM"],
     days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
     shortDays: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
     months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
     shortMonths: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]});
   ```
   
   ### Expected results
   
   Expected to see the currency as R$ 1.234,56
   
   ### Actual results
   
   $ 1,234.56
   
   #### Screenshots
   I highlighted the date because looks like the defaultLocale  is working for date/time.
   <img width="1405" alt="Foto" src="https://user-images.githubusercontent.com/26379593/71686032-d4ef4f00-2d78-11ea-9340-7f65233b2d25.png">
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `0.34.1rc1`
   - python version: `Python 3.6.9`
   - node.js version: `v10.16.3`
   - npm version: `6.9.0`
   
   ### 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.
   - [] 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'm opening this new issue because the previus one was closed.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] andy-clapson commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
andy-clapson commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-575208314
 
 
   We are having the same issue - getting this https://github.com/apache/incubator-superset/issues/3972#issuecomment-535037981 working in some way would be a dynamite upgrade for deploying across non-US countries.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] samuel-antonini commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
samuel-antonini commented on issue #8913:
URL: https://github.com/apache/superset/issues/8913#issuecomment-852336820


   I'm sorry to bump this, but I tried @rusackas suggestion and didn't have any luck (keep getting 'Invalid format: MOEDA_BR').
   
   I have also tried editing the defaultLocale file in  ```superset/assets/node_modules/d3-format/src/defaultLocale.js``` and building everything with ```npm run build``` (as described in #3972) but again, nothing happened.
   
   Can someone point me in the right direction? Are all these approaches still valid in Superset 0.37?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] tcopple commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
tcopple commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-570656098
 
 
   @SWoto does it work if you set the format in the chart meta? I've overcome some of the default formatting by setting it there when I want dollarized but no cents.
   
   ![image](https://user-images.githubusercontent.com/619743/71741226-53f18f80-2e2c-11ea-9a70-3bf8916cb762.png)
   
   You can get there by clicking the "edit" button on the `charts/list` resource.
   
   ![image](https://user-images.githubusercontent.com/619743/71741277-7c798980-2e2c-11ea-8c86-245342cccd0a.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rusackas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
rusackas commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-607355028
 
 
   Holler if this is still an issue, and we can re-open it if needed. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] SWoto commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
SWoto commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-575228870
 
 
   @mistercrunch, please reopen this issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] nfbrentano commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
nfbrentano commented on issue #8913:
URL: https://github.com/apache/superset/issues/8913#issuecomment-951175328


   i have the same problema


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] SWoto commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
SWoto commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-571678745
 
 
   It "works" when I do it, just like when i change almost the same thing in the source code... The main problem is to change the decimal/thousands separator and the currency symbol to look like:
   
   R$ 1.234,15
   instead of
   $ 1,234.15

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] startwoinformatica commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
startwoinformatica commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-571672250
 
 
   It "works" when I do it, just like when i change almost the same thing in the source code... The main problem is to change the decimal/thousands separator and the currency symbol to look like:
   
   R$ 1.234,15
   instead of 
   $ 1,234.15

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] startwoinformatica removed a comment on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
startwoinformatica removed a comment on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-571672250
 
 
   It "works" when I do it, just like when i change almost the same thing in the source code... The main problem is to change the decimal/thousands separator and the currency symbol to look like:
   
   R$ 1.234,15
   instead of 
   $ 1,234.15

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #8913: Currency format D3

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #8913: Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-570309684
 
 
   Issue Label Bot is not confident enough to auto-label this issue. See [dashboard](https://mlbot.net/data/apache/incubator-superset) for more details.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] SWoto commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
SWoto commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-690797069


   @osandrolucas,
   I've tried some things but to no avail. The best solution at that time was use a query to change the currency to text and replace the points with commas. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-599806708
 
 
   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.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] closed issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
stale[bot] closed issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] SWoto removed a comment on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
SWoto removed a comment on issue #8913: Issue with Currency format D3
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-575228870
 
 
   @mistercrunch, please reopen this issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] osandrolucas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
osandrolucas commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-691202595






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] junlincc closed issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
junlincc closed issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] osandrolucas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
osandrolucas commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-691202595


   Ok :( 
   Thanks for the support @SWoto 
   
   **I have an suggestion:** 
   concat('R$ ', format('%,.2f', value))
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rusackas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
rusackas commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-693947861


   I recently answered a fairly similar question over on Stack Overflow, which points to some of the code that can be edited to create currency locales with custom currency symbols and separator (decimal/comma) placement/formatting.
   
   https://stackoverflow.com/questions/63319902/customise-the-number-format-in-apache-superset/63385549#63385549


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] SWoto edited a comment on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
SWoto edited a comment on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-690797069


   @osandrolucas,
   Changing d3 format made some differences, but most of the problem persisted.
   
   I've tried some things but to no avail. The best solution at that time was use a query to change the currency to text and replace the points with commas. 
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] osandrolucas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
osandrolucas commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-694409218


   Great!
   
   Thank you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] osandrolucas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
osandrolucas commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-690684030


   Hi.
   I have the same problem. How to fix?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] osandrolucas commented on issue #8913: Issue with Currency format D3

Posted by GitBox <gi...@apache.org>.
osandrolucas commented on issue #8913:
URL: https://github.com/apache/incubator-superset/issues/8913#issuecomment-691202595






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org