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 14:05:06 UTC

[GitHub] [incubator-superset] SWoto edited a comment on issue #3972: [feature] Global customise-able d3 locale

SWoto edited a comment on issue #3972: [feature] Global customise-able d3 locale
URL: https://github.com/apache/incubator-superset/issues/3972#issuecomment-570216308
 
 
   The changes that I mentioned above did work for weekdays and time range filters. However, they didn't change the currency format.
   
   The image bellow shows the calendar changes working and also the currency don't working.
   
   @PeterCahn, do you have any idea what it might be?
   
   #edit
   This is my defaultLocale.js file.
   `import formatLocale from "./locale";
   
   var locale;
   export var format;
   export var formatPrefix;
   
   defaultLocale({
     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"]});
   
   export default function defaultLocale(definition) {
     locale = formatLocale(definition);
     format = locale.format;
     formatPrefix = locale.formatPrefix;
     return locale;
   }
   `
   
   <img width="1405" alt="Print" src="https://user-images.githubusercontent.com/26379593/71670616-2d115b80-2d4f-11ea-8081-3b25453c0300.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