Skip to content

Chart not accurate #1432

Open
Open

Description

@lishine

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>

Activity

  1. lishine commented on Sep 23, 2021

    @lishine
    Author

    React-vis

    image

  2. lishine commented on Sep 23, 2021

    @lishine
    Author

    Recharts

    image

  3. lishine commented on Sep 23, 2021

    @lishine
    Author

    Tradingview

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions