Browse Source
Merge pull request #1056 from meriadec/fix/965-currency-chart-countervalue
Use user-defined countervalue in account page chart tooltip
master
Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
1 deletions
-
src/components/BalanceSummary/index.js
-
src/components/base/Chart/handleMouseEvents.js
-
src/components/base/Chart/index.js
|
|
@ -73,6 +73,7 @@ const BalanceSummary = ({ |
|
|
|
} |
|
|
|
height={200} |
|
|
|
currency={counterValue} |
|
|
|
cvCode={counterValue.ticker} |
|
|
|
tickXScale={selectedTimeRange} |
|
|
|
renderTickY={ |
|
|
|
isAvailable ? val => formatShort(counterValue.units[0], val) : () => '' |
|
|
|
|
|
@ -96,7 +96,7 @@ export default function handleMouseEvents({ |
|
|
|
unit={props.unit} |
|
|
|
renderTooltip={renderTooltip} |
|
|
|
item={d.ref} |
|
|
|
counterValue={getFiatCurrencyByTicker('USD')} |
|
|
|
counterValue={getFiatCurrencyByTicker(props.cvCode || 'USD')} |
|
|
|
/> |
|
|
|
</ThemeProvider> |
|
|
|
</Provider>, |
|
|
|
|
|
@ -48,6 +48,7 @@ import type { Data } from './types' |
|
|
|
export type Props = { |
|
|
|
data: Data, // eslint-disable-line react/no-unused-prop-types
|
|
|
|
unit?: ?Unit, // eslint-disable-line react/no-unused-prop-types
|
|
|
|
cvCode?: string, // eslint-disable-line react/no-unused-prop-types
|
|
|
|
id?: string, // eslint-disable-line react/no-unused-prop-types
|
|
|
|
height?: number, |
|
|
|
tickXScale: string, // eslint-disable-line react/no-unused-prop-types
|
|
|
|