Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added mockup heatmap to user-page. * Updated mockup to better reflect target html. * Added empty functions for acquiring and transforming heatmap data. * Proper generation of mockup data in method. Partially finished transformation of data. * Finished replacing mockup with HTML generated using django templates. * Removed outer div, and removed commented code. * Finished logic for retrieving latest purchases and transforming it. * Reformatted and removed redundant imports * Corrected off-by-one error in day rendering. Finished database queryies for now. * Reformatted code using black * Finished implementing database lookup! Basic heatmap functionality is finished. * Inverse filtering * Removed mockup function * moved heatmap logic into separate file * Moved remaining function to separate file, and added typing * Prepared table to support multiple color modes * Finished multiview, and added general view, and figure description * Temporarily added heatmap testdata * Made general-view the primary view, and improved template code. Removed redundant dependency in views.py * Inverted brightness, to make darker colors show more activity. Offset general by 1 to avoid black squares. * Swapped figure button text, to display the next mode instead of current. * Partially finished abstracting heatmap color modes * Finished abstracting heatmap color modes. Added separate buttons for each mode instead of cycling. * Proposed solution for displaying purchased products * Removed iter from query loop * Selects related product field immediately instead of making duplicate queries * Improved appearance * Made product count appear whenever mouse enters figure. Styled number to look consistent. * Finished money-used color mode. Made title show current mode selected. Refactored heatmap code. * Improved interactivity by adding day summaries, every day now shows the total, e.g. money spent that day for money-sum. * Fixed crash on rendering other than 10 weeks * Resolved crash on empty heatmap. Corrected week numbers on new year wrap. * "Vare" vs. "varer" * Added RGB interpolation for color values. * test * test * dummy change to trigger CI * Revert "dummy change to trigger CI" This reverts commit 241ccbd. * fixup py versions * add caching to build * nop * nop * try reverting action-version * nop * Abstracted heatmap preparation into new method. * Made a few tests. Need to improve further. * Finished tests * Removed color brightness from category heatmap * Displays 12 weeks default, as it corresponds to last 3 months * Reorganized code, removed some comments, and added docstring * Whoops. Should work now. * Resolved bug for when a purchased product isn't in the table anymore, but is in history. * Test errors interpret now as well * Updated fixture * Changed event listening method * Resolved nested loops * Resolved issue (my laptop setup is non-optimal) * Reduced category/product lookup from 6 queries to 3. * Refactored function names, and corrected typing * Changed the colors on the category chart, to (kind of) make it better to look at * Black formatter --------- Co-authored-by: falkecarlsen <11318702+falkecarlsen@users.noreply.github.com>
- Loading branch information