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

Rect elements not properly scaled #496

Closed
GopiGugan opened this issue Nov 15, 2023 · 4 comments
Closed

Rect elements not properly scaled #496

GopiGugan opened this issue Nov 15, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@GopiGugan
Copy link
Contributor

Screen Shot 2023-11-15 at 8 59 19 AM

@GopiGugan GopiGugan added the bug Something isn't working label Nov 15, 2023
@ArtPoon
Copy link
Contributor

ArtPoon commented Nov 15, 2023

Just to put the above into words, the range of collection dates for this lineage does not line up with the time axis of the tree plot

@GopiGugan
Copy link
Contributor Author

image

The cutoff slider does not align with the time axis of the tree plot either

@GopiGugan
Copy link
Contributor Author

Looks like the issue with the xaxis scaling was because we were setting an interval of 365.25 days:

covizu/js/drawtree.js

Lines 163 to 167 in 4ab1ba4

function xaxis_to_date(x, tip) {
var coldate = new Date(tip.first_date); // collection date of reference tip
coldate = d3.timeDay.offset(coldate, 365.25*(x - tip.x));
return (coldate.toISOString().split('T')[0]);
}

I've adjusted this now to use an interval based on the earliest and latest collection date of samples from all clusters in the tree

GopiGugan added a commit that referenced this issue Dec 18, 2023
@GopiGugan GopiGugan mentioned this issue Dec 18, 2023
@ArtPoon
Copy link
Contributor

ArtPoon commented Jan 9, 2024

Pending PR

@ArtPoon ArtPoon closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants