Browse Source

Use user-defined countervalue in account page chart tooltip

closes #965
master
meriadec 7 years ago
parent
commit
6be879857d
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 1
      src/components/BalanceSummary/index.js
  2. 2
      src/components/base/Chart/handleMouseEvents.js
  3. 1
      src/components/base/Chart/index.js

1
src/components/BalanceSummary/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) : () => ''

2
src/components/base/Chart/handleMouseEvents.js

@ -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>,

1
src/components/base/Chart/index.js

@ -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

Loading…
Cancel
Save