-
Notifications
You must be signed in to change notification settings - Fork 31
560 implement report charts #72
560 implement report charts #72
Conversation
Gets the chart started as this is what real data will look like.
Copying fields so they are in line with what chart expect. Don't think this is best way to do this. Have to look more into how charts work, or maybe do this operation on front end.
Aliasing the values because the front-end works much easier with them. This could be done in template code, or the charting function could be changed instead. Limits the results by setting per page and then 1st page. Confused because I had to multiply the per page by 2, so will look at this after.
What do you mean putting the debts on the bottom? I'm wondering if you're looking at an older mock (if so, my bad). They debts used to go below the x-axis, but now should just go above. |
Oops, I see what I did now. The one in InVision was old, sorry. I just updated it: |
OK that's good, it makes my life easier |
This was breaking tests.
Question: Here, as per the mockup, I modified the chart so only the top "tick" or number is showing. Is this supposed to be done for all charts to keep consistency? Or am I supposed to write special code for just this chart. Also, I may be confused, but I believe the issue says to take the last 4 reports, but the mockup has 9 separate reports showing. Which is correct? This is making the width of the chart different from the mockups.
I need to talk to Noah about the pattern he wanted implemented in the mockup, this is close to that color though. I also was unsure of color organization. I created two new color vars for this, but I think it would've been better to try and reuse existing colors. Am unsure of which ones to use though.
Sorry, just got around to reviewing this. I can't speak to the Python, but the HTML / Sass looks good to me. @LindsayYoung or @theresaanna can you review the other stuff? |
t_url = '/committee/' + committee_id + '/totals' | ||
reports = _call_api(r_url, {}) | ||
reports = _call_api(limited_r_url, {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why limit results from candidates but not committees?
I am looking at Obama for America since it has a lot of info associated with it I am not seeing the items in the charts and tables that come from the most recent report:
The candidate page has the same cash and debt problem On the Receipts and Disbursements charts, it looks like the underling dates are wrong the beginning and end period are the same. I will make a separate ticket for that- we should check again once we have the golden gate data. Also, @noahmanger if we are only listing one cash on hand, I think cash on hand end of period would be better since it is more recent. |
@LindsayYoung I agree that we should just be |
Should this PR be tagged '[WIP]' or is it done? |
Completed most of the bug, still have to reconfigure chart UI to put debts on the bottom.
Read commit messages for explanations.
I want to add tests but was unsure of the structure of them.