councilforeconed / interactive-activities

Council for Economic Education
http://interactives.councilforeconed.org
Mozilla Public License 2.0
6 stars 2 forks source link

Pizza Prod: Fix endgame report chart #149

Closed jugglinmike closed 8 years ago

jugglinmike commented 8 years ago

Resolving this issue actually involved two independent fixes to the report generation logic. Those changes are backed by unit tests, so hopefully that will help avoid regressions.

I chose to address the issue with axis labels by moving them outside of the chart field. This also avoids (unreported) issues where the data being visualized could collide with the axis labels themselves. Because this effects all instances of the project's generic bar chart, this change is also visible in the activity "instructor reports" for Pizza Productivity and The Supply and Demand of Cocoa.

As an example, here is a report for a game that had four total chefs and where 1 pizza was completed in the first round, 0 pizzas were completed in rounds 3 and 4, and 1 pizza was completed in the final round.

Before

screenshot from 2015-12-08 13 15 53

After

screenshot from 2015-12-08 13 16 10

Resolves gh-142