react-exchange-rate-bar-chart
v1.0.5
Published
React component that renders an interactive bar chart comparing two currencies over a variable number of months.
Downloads
11
Maintainers
Readme
react-currency-compare-bar-chart
Thanks for checking out react-exchange-rate-bar-chart.
Demo: https://gregplechaty.github.io/npm-currency-compare-bar-chart/
- Compare exchange rates between currencies
- Return data across several months
- Users can choose currencies and number of months to return data for
Installation & Usage
npm install react-exchange-rate-bar-chart --save
Including the Component
import React from 'react'
import { ExchangeRatebarChart } from 'react-exchange-rate-bar-chart'
function App() {
return (
<div>
<ExchangeRateBarChart />
</div>
)
};
Optional Properties
- title: Sets the chart title. -If omitted, defaults to: 'Exchange Rates'
- currencyList: Accepts an array of currency symbols. This is used for both the base currency and the currency it is compared to. For the complete list, go here: https://api.exchangerate.host/symbols
- If omitted, defaults to: ['USD', 'EUR', 'JPY', 'GBP', 'AUD', 'HKD',]
About the API used
Data comes from the "exchangerate.host" API. Documentation can be found here: https://exchangerate.host/. This is rather useful if you're interestred in customizing the chart further. If you use this component in your project, feel free to give them a shoutout!