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

Aligned timeline tooltip doesn't handle large changes in gaps in initial dataset well #231

Open
MMeent opened this issue Sep 19, 2022 · 0 comments

Comments

@MMeent
Copy link

MMeent commented Sep 19, 2022

Example: https://star-history.com/#neondatabase/neon&Timeline

The neondatabase/neon repository has a long time between the first and the second datapoint (>~ 1 year) so all later datapoints all use that same time scale for their tooltips (N years), but later datapoints only have a small gap (2 days for 900 stars, if you look at the unaligned timeline).

I think the issue originates from https://github.com/bytebase/star-history/blob/49f1f439e2dbfcc963901415cb96b0efd938cfa4/packages/xy-chart/index.ts#L325-L336 where the chart is locked-in at the scale of the first datapoint, which doesn't always work well. A better scale might be Math.min(firstDataPoint, lastDataPoint / nDataPoints), or Math.min(...dataPointDeltas)

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

No branches or pull requests

3 participants
@MMeent @boojack and others