Currency in euros
See original GitHub issueIs your feature request related to a problem? Please describe. I can’t find a clean way to display currency in euros (€) in my Nivo Charts.
Describe the solution you’d like
A way to set the d3.locale
functin for the chart, maybe through a property.
Something like:
<Chart
{...props}
locale={{
currency: ["", "€"],
decimal: ".",
...
}}
/>
Describe alternatives you’ve considered Writing a custom function to to that, but I wouldn’t know where to put it.
Additional context
I’m using the format valueFormat=">-$.4~s"
, which is fine, I just need the €
symbol instead of $
Thanks a lot
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Euro - Wikipedia
The euro (symbol: €; code: EUR) is the official currency of 19 out of the 27 member states of the European Union (EU)....
Read more >The euro - European Central Bank
Today, the euro is the currency of 19 EU countries and over 340 million Europeans. It is one of the most important currencies...
Read more >1 USD to EUR - US Dollars to Euros Exchange Rate - Xe
Our currency rankings show that the most popular Euro exchange rate is the EUR to USD rate. The currency code for Euros is...
Read more >Euro | Definition, History, Symbol, & Facts - Britannica
euro, monetary unit and currency of the European Union (EU). It was introduced as a noncash monetary unit in 1999, and currency notes...
Read more >Currency Exchange Table (Euro - EUR) - X-Rates
Euro△ 1.00 EUR△▽ inv. 1.00 EUR△▽
Argentine Peso 185.513944 0.005390
Australian Dollar 1.585423 0.630746
Bahraini Dinar 0.399430 2.503567
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would like to see a feature like this implemented. Actually for me there’s no way around having some way to configure the locale for
d3-format
.Our use case
We’re using nivo on the front-end, but we’re generating pdf-documents on the back-end. To render charts I use Nivo charts with server-side rendering. The properties for the nivo charts are passed over the network/JSON. This makes it impossible to use a format function.
For our purpose we need numbers formatted for German speakers. As I haven’t found a way to configure the locale for
d3-format
used bynivo
as it’s described in the docs of d3-format we’re currently at an impasse.What have I tried
I suspected I should be able to install
d3-format@^1.4.4
and used3.formatDefaultLocale
, but for reasons I haven’t investigated this doesn’t work.Implementation
Personally I like the api-proposal of @francescocretti to add a property for localization although I would call it
d3Locale
to be more precise.I would offer myself to implement this
But I would like to first have the way this should be implemented first agreed upon with @plouc.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!