-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update createDiversityGaugeChart to use d3.js radial functions in place of multiple linear functions #338
base: master
Are you sure you want to change the base?
Conversation
report overhaul phase 2
Before I dive into static review, there are some general adjustments that will probably impact some of the code:
|
Update CSS names and move colors to guage diversity chart function. Update gauge diversity function calculation of font width and height. Add comments to gauge diversity function. Rename inner functions to be more descriptive. Add inner function to adjust score and text position so they don't obscure each other when they are close in value.
Also passed in diversity values as an object to the diversity gauge function where the object is after the ajax call where diversityInSampleValue was hard coded as a response. Now hardcoded all the diversity scores to be passed to the diversity gauge function. I can change that if needed back to hard coding only the sample diversity score and hard coding the other scores inside the guage creation function. |
This commit replaces the original createDiversityGaugeChart function that creates the diversity gauge chart. It uses d3.js radial functions and hard coded diversity values to display the chart rather than multiple d3.js linear functions using arbitrary values to match the figma gauge image.
My code editor had replaced quotes, and I reverted that. So the commits to compare would be from 3 weeks ago 2fca954 (Merge pull request #325 from ayobi/report_overhaul_phase2) with this one 11ce3e5.
I removed the styles for the diversity gauge from the report template new_results_page.jinja2 and moved them into minimal_interface.css