Skip to content

Commit

Permalink
Merge pull request apache#1 from mittalsuraj18/add-indian-numbering-s…
Browse files Browse the repository at this point in the history
…ystem

Add indian numbering system
  • Loading branch information
mittalsuraj18 authored Feb 22, 2023
2 parents a0ca0c0 + ebe5fc4 commit c72d9da
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions superset-frontend/src/setup/setupFormatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
getTimeFormatterRegistry,
smartDateFormatter,
smartDateVerboseFormatter,
createD3NumberFormatter,
} from '@superset-ui/core';

export default function setupFormatters() {
Expand Down Expand Up @@ -66,6 +67,18 @@ export default function setupFormatters() {
.registerValue(
'DURATION_SUB',
createDurationFormatter({ formatSubMilliseconds: true }),
)
.registerValue(
'CURRENCY_INDIA',
createD3NumberFormatter({
locale: {
decimal: '.',
thousands: ',',
grouping: [3, 2, 2, 2, 2, 2, 2, 2, 2, 2],
currency: ['₹', ''],
},
formatString: '$,.2f',
}),
);

getTimeFormatterRegistry()
Expand Down

0 comments on commit c72d9da

Please sign in to comment.