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

report overhaul phase 2 #325

Conversation

ayobi
Copy link
Contributor

@ayobi ayobi commented Nov 21, 2024

For phase 2, we are implementing the new diversity score graph in the diversity tab.

Comment on lines +1375 to +1413
if (diversityInSampleValue == highestDiversityScore) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.97, radius * 0.46, -46);
}

if (diversityInSampleValue > lowestDiversityScore && diversityInSampleValue <= 2.99) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.75, radius * 0.45, 13);
}

if (diversityInSampleValue >= 3.0 && diversityInSampleValue <= 3.99) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.65, radius * 0.30, 3);
}

if (diversityInSampleValue >= 4.0 && diversityInSampleValue <= 4.99) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.30, radius * 0.35, 8);
}

if (diversityInSampleValue >= 5.0 && diversityInSampleValue <= 5.99) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.10, radius * 0.35, -30);
}

if (diversityInSampleValue >= 6.0 && diversityInSampleValue <= 6.49) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.25, radius * 0.55, 5);
}

if (diversityInSampleValue >= 6.5 && diversityInSampleValue <= 6.99) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.25, radius * 0.45, 5);
}

if (diversityInSampleValue >= 7.0 && diversityInSampleValue < highestDiversityScore) {
const angle = scale(diversityInSampleValue);
drawIndicatorLine(angle, radius * 0.45, radius * 0.25, -35);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the line for the diversity score is being drawn via d3 rather than trying to position a nested SVG, can you please condense all of these conditional statements? We know what the angle is, so shouldn't it just be a matter of drawing a line from the desired inner radius to the desired outer radius? If that's not the case, please explain the issue that requires these conditionals.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll send an email with explanation and screenshots.

microsetta_interface/templates/new_results_page.jinja2 Outdated Show resolved Hide resolved
microsetta_interface/templates/new_results_page.jinja2 Outdated Show resolved Hide resolved
microsetta_interface/templates/new_results_page.jinja2 Outdated Show resolved Hide resolved
microsetta_interface/templates/new_results_page.jinja2 Outdated Show resolved Hide resolved
@cassidysymons cassidysymons changed the base branch from master to csymons_report_overhaul_phase_2_working January 8, 2025 00:04
@cassidysymons
Copy link
Collaborator

Merging into a working branch for further development

@cassidysymons cassidysymons merged commit 2e2ec5d into biocore:csymons_report_overhaul_phase_2_working Jan 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants