react-vis
react-vis copied to clipboard
Chart not accurate
Cannot figure out why chart with react-vis differ so much from same chart with recharts. Why it is so wrong? And different curves didn't help... This is a price chart. I compared it to an external program - Tradingview and the recharts is pretty accurate. Cannot understand what is wrong. Pictures are attached
time is in ms
<XYPlot getX={(d: any) => d.time} getY={(d: any) => d.price} width={1900} height={880}>
<Line
data={dataSnap.data as any[]}
size={3}
fill='blue'
// curve='curveLinear'
/>
<XAxis
// tickValues={data.map((d) => d.timestamp)}
tickTotal={10}
tickFormat={(v) => {
return dayjs(v).format('mm')
// return dayjs(v).format('HH-mm-ss-sss')
}}
// tickTotal={100}
/>
<YAxis width={70} tickTotal={10} />
</XYPlot>
React-vis

Recharts

Tradingview
