SolarArbiter / solarforecastarbiter-core

Core data gathering, validation, processing, and reporting package for the Solar Forecast Arbiter
https://solarforecastarbiter-core.readthedocs.io
MIT License
33 stars 21 forks source link

[SFAII] improve reports with ability to sort graphs/tables by metric values #796

Closed awig closed 1 year ago

awig commented 1 year ago
awig commented 1 year ago

implemented table sort in javascript. hardest part figurring where and how to figure to include it in the flask/jinja2 templates but can apply to the other tables besides metrics. @dplarson thoughts? could add up/down arrows too but that doeesn't seem that important

https://user-images.githubusercontent.com/6306150/209403241-77f4dc9e-8506-46cd-9442-742d800ed6b7.mov

awig commented 1 year ago

Implemented for all tables besides the "Table of data alignment parameters".

dplarson commented 1 year ago

@awig looks good and shows the functionality I was expecting. But I do think up/down arrows would be helpful for users as otherwise there isn't a visual indicator that you can sort. (Ideally the up/down arrows would change dynamically as you click to show you which way you are sorting, e.g., both up & down arrows when unsorted, up arrow only when sorting ascending and down arrow only when sorting descending. However, I think even static arrows would be helpful, i.e., add an up/down arrow icon next to each column name to indicate that you can sort but then the icon doesn't change when you click.)

awig commented 1 year ago

Took a bit of playing around with but added the arrows with highlights for sorting.

https://user-images.githubusercontent.com/6306150/210712280-a71d3f5d-3408-4115-99b2-62aa8e192b83.mov

dplarson commented 1 year ago

Looks great to me 👍

awig commented 1 year ago

I've added the sort Total graphs with dropdown menus as shown in this video:

https://user-images.githubusercontent.com/6306150/210913857-4bea0c4d-a203-4d82-93fd-e0bb102593f9.mov

Couple of questions/comments for @dplarson

dplarson commented 1 year ago

@awig I'm happy with the layout/look as shown and I don't think there is a need to add sorting to other categories at this time. (It's possible we may want to add sorting to more places later but I think that will become apparent once we get more folks using this functionality and can then address that through a later PR if necessary.)

awig commented 1 year ago

Thanks. I'll go ahead and push the branch and the PR, double check codecov and linter and then it should be good for your to review.