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

How to use it?README is not clear #109

Open
Pahkoo opened this issue Jul 5, 2024 · 5 comments
Open

How to use it?README is not clear #109

Pahkoo opened this issue Jul 5, 2024 · 5 comments

Comments

@Pahkoo
Copy link

Pahkoo commented Jul 5, 2024

1.usePriceHistory() Where does it come from?
2.LineGraph component ’point‘ property supports incoming data types
3.What specific features are available for the LineGraph component in total?

@naftalimurgor
Copy link

I'm stuck at the same, is usePriceHistory(args) provided by the library? someone please clarify. If not how's this hook structured to return valid points prop?

@camchis
Copy link

camchis commented Jul 30, 2024

usePriceHistory() is a custom hook just used as an example, which would return GraphPoint[]

@seelentov
Copy link

points: GraphPoint[];

export interface GraphPoint {
    value: number;
    date: Date;
}

example:
points = [{"date": 2024-08-28T19:00:00.000Z, "value": 897.2629999999999}, {"date": 2024-08-29T19:00:00.000Z, "value": 896.959}, {"date": 2024-08-30T19:00:00.000Z, "value": 891.172}, {"date": 2024-09-02T19:00:00.000Z, "value": 880.2819999999999}, {"date": 2024-09-03T19:00:00.000Z, "value": 863.4789999999999}, {"date": 2024-09-04T19:00:00.000Z, "value": 862.935}, {"date": 2024-09-05T19:00:00.000Z, "value": 868.665}, {"date": 2024-09-06T19:00:00.000Z, "value": 874.389}]

@naftalimurgor
Copy link

Fair point, How about using custom labels like days of the week instead of Date?

@seelentov
Copy link

Fair point, How about using custom labels like days of the week instead of Date?

I think its get more functionality to module. Nothing prevents you from making the dates flat and configuring their output in the component configuration

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

4 participants