Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Chart x-axis tics are mis-aligned #205

Open
Zodiase opened this issue Jun 4, 2018 · 4 comments
Open

Chart x-axis tics are mis-aligned #205

Zodiase opened this issue Jun 4, 2018 · 4 comments
Labels

Comments

@Zodiase
Copy link
Contributor

Zodiase commented Jun 4, 2018

From @kintigh:

In graph view, the vertical line that gives the date and the value does not line up correctly with the tic marks and labels on the x axis. This can be seen in graphs for relatively short time periods (e.g. 100 years).

@Zodiase
Copy link
Contributor Author

Zodiase commented Jun 4, 2018

image
image

@Zodiase Zodiase added the bug label Jun 4, 2018
@Zodiase
Copy link
Contributor Author

Zodiase commented Jun 4, 2018

Not sure what's causing this yet.

@Zodiase
Copy link
Contributor Author

Zodiase commented Jun 6, 2018

Looks like whenever I use precise x-axis ticks (by giving a count or a list of x values), the mis-alignment happens. My guess is the problem is caused by rounding precise date values to years, e.g. the position of the tick is April 20th, 1200 but the label displayed is 1200 (due to the format).

@Zodiase
Copy link
Contributor Author

Zodiase commented Jun 6, 2018

To deal with this we'd need some complex algorithm that carefully picks x values, instead of simply dividing range by tick count. This algorithm needs to handle ranges over 1k years, 100 years, 10 years, within 1 year (with monthly data) and maybe even smaller ranges.

An edge case the algorithm needs to handle:

If there are 6 years in the range, and there is only space for 5 labeled tick marks, which one does it through away?

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

No branches or pull requests

1 participant