Overview
This ticket is to create a Game Dashboard for the Simulateur stock market simulation platform. The dashboard will display a history of transactions made by each team, show a graph of all the teams' performance, and include a news scroller to display recent news events. The objective is to provide a comprehensive overview of team activities, performance metrics, and recent news in the simulation.
Steps to Implement Game Dashboard
-
Create a New View for the Dashboard:
- Develop a new view in
views.py to handle the Game Dashboard logic. This view will fetch transaction histories, team performance data, and recent news events.
-
Fetch and Process Data:
- Retrieve all teams and their associated transaction histories.
- Calculate the current balance for each team based on their portfolios.
- Fetch recent news events from the database.
-
Generate Graph Data:
- Use Matplotlib to create a bar graph showing the balance of each team.
- Encode the graph image in base64 format to embed it directly into the template.
-
Create Dashboard Template:
- Develop a Django template
game_dashboard.html to display the transaction history, the graph, and the news scroller.
- Use Django's template language to iterate over teams and their transaction histories.
- Embed the generated graph image in the template.
- Create a news scroller section to display recent news events.
-
Add URL Pattern:
- Define a URL pattern in
urls.py to route requests to the new Game Dashboard view.
Expected Behavior
The Game Dashboard should display a list of transactions made by each team, a graph showing the balance of all teams, and a news scroller displaying recent news events. Users should be able to view and analyze team performance, transaction history, and recent news through this dashboard.
Additional Information
Ensure the dashboard is styled consistently with the rest of the platform and is user-friendly.
Overview
This ticket is to create a Game Dashboard for the Simulateur stock market simulation platform. The dashboard will display a history of transactions made by each team, show a graph of all the teams' performance, and include a news scroller to display recent news events. The objective is to provide a comprehensive overview of team activities, performance metrics, and recent news in the simulation.
Steps to Implement Game Dashboard
Create a New View for the Dashboard:
views.pyto handle the Game Dashboard logic. This view will fetch transaction histories, team performance data, and recent news events.Fetch and Process Data:
Generate Graph Data:
Create Dashboard Template:
game_dashboard.htmlto display the transaction history, the graph, and the news scroller.Add URL Pattern:
urls.pyto route requests to the new Game Dashboard view.Expected Behavior
The Game Dashboard should display a list of transactions made by each team, a graph showing the balance of all teams, and a news scroller displaying recent news events. Users should be able to view and analyze team performance, transaction history, and recent news through this dashboard.
Additional Information
Ensure the dashboard is styled consistently with the rest of the platform and is user-friendly.