-
Notifications
You must be signed in to change notification settings - Fork 49
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
Initial implementation of LineChart #315
Conversation
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.
The implementation looks lean and beautiful. Thanks!
I have added some comments regarding imports and edge case of input data.
Thanks a lot for the feedback! I'm marking this as WIP and will hold off until we get confirmation on the design. |
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.
The chart is looking pretty good!
I have added some comments regarding some details of CSS and i18n.
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.
Recently I have rolled back apollo client to version 2. Please also rebase the PR and change apollo-client 3 dependencies accordingly. More specifically,
|
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.
LGTM now :) Thanks for the fix and let's
const ticks = getTicks(scale, roundFn, tickNum); | ||
return ticks.map((tick, i) => ( | ||
<TickGroup | ||
key={`${tick - 0}_${i}`} |
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.
What does this -0
for?
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.
tick
could be a number
or a date
, -0
remains the same if it's a number and converts date
into epoch seconds otherwise.
it's not necessary, just makes the key
look cleaner
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.
I see. We could use unary +
to convert things to number, it's shorter ;)
Merging this PR to feature branch instead of
dev
because it's still a work in progress, and blocked by designs.However, I would like to check with you and see if the current implementation aligns with the current coding style/standard before moving further, as we have discussed a few times about how to integrate
d3
withReact
.