react-vis icon indicating copy to clipboard operation
react-vis copied to clipboard

Chart not accurate

Open lishine opened this issue 4 years ago • 3 comments

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>

lishine avatar Sep 23 '21 07:09 lishine

React-vis

image

lishine avatar Sep 23 '21 07:09 lishine

Recharts

image

lishine avatar Sep 23 '21 07:09 lishine

Tradingview

image

lishine avatar Sep 23 '21 07:09 lishine