-
Notifications
You must be signed in to change notification settings - Fork 335
Proposal for charts component #201
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
I also need to write the tests for it |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
- Coverage 95.68% 95.19% -0.49%
==========================================
Files 14 15 +1
Lines 950 978 +28
==========================================
+ Hits 909 931 +22
- Misses 41 47 +6 ☔ View full report in Codecov by Sentry. |
colors: string[] | ||
tooltip?: boolean | ||
} | ||
export interface BaseModel {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also unsure why this came about - i probably miissed something somewhere
title: str | ||
width: _t.Union[int, str] = '100%' | ||
height: _t.Union[int, str] | ||
data: _t.List[DataPoint] # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a better way to do this ?
This PR is more a proposal at this stage, the initial chart implemented is a line chart - very happy to add more if this template seems acceptable. I can also clean a bit the implementation and add parameters if we want.
Here are a few things to note:
recharts
https://github.com/recharts/recharts , this might be a downside if we don't want to have dependencies ? (in particular, this first pr only does the line chart examples here)json_schema_extras
- not sure how to decide, probably for the the maintainer to decide.100%
in height the graph never stops - i am missing something to understand why.For now here is how it looks:

PS: i hope this can be useful, i would really love to see charts in fastui :)