fix segment query update

This commit is contained in:
c9s 2021-01-29 11:19:52 +08:00
parent 8031c6066e
commit 4387feef77

View File

@ -102,7 +102,7 @@ export default function TradingVolumeBar(props) {
queryTradingVolume({period: props.period, segment: props.segment }, (tradingVolumes) => {
setTradingVolumes(tradingVolumes)
})
}, [props.period])
}, [props.period, props.segment])
const [data, keys] = groupData(tradingVolumes, period, segment)
@ -114,6 +114,7 @@ export default function TradingVolumeBar(props) {
valueScale={{type: 'linear'}}
indexScale={{type: 'band', round: true}}
labelSkipWidth={30}
labelSkipHeight={20}
enableGridY={true}
colors={{scheme: 'paired'}}
axisBottom={{