nsidc / usaon-benefit-tool

Application for configuring USAON Benefit Tool value tree analysis surveys and gathering input from respondents
https://usaon-benefit-tool.readthedocs.io/
MIT License
0 stars 3 forks source link

Generate tooltip HTML in Python before passing data to Highcharts #276

Closed mfisher87 closed 3 months ago

mfisher87 commented 3 months ago

Closes #52. I know this may not be a complete solution, but it's a best attempt at translating from the legacy app, and helps us define where we want to go from there. Let's open further tickets to refine.

Highcharts just uses the tooltipHTML data it finds on the hovered point. Since we need to access the relevant data in the Python anyway, this makes sense logically.

However, there's a performance cost of this implementation, as noted in comments. Those templates are being rendered lots of times and I think they're going to be triggering lots of queries. At our scale, we'll probably be fine, but there's room for optimization here when we find the need.


📚 Documentation preview 📚: https://usaon-benefit-tool--276.org.readthedocs.build/en/276/