Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart not accurate #1432

Open
lishine opened this issue Sep 23, 2021 · 3 comments
Open

Chart not accurate #1432

lishine opened this issue Sep 23, 2021 · 3 comments

Comments

@lishine
Copy link

lishine commented Sep 23, 2021

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
Copy link
Author

lishine commented Sep 23, 2021

React-vis

image

@lishine
Copy link
Author

lishine commented Sep 23, 2021

Recharts

image

@lishine
Copy link
Author

lishine commented Sep 23, 2021

Tradingview

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant