Skip to content

Implement Dashboard to Show Team Transactions, Balances, and Recent News #17

Description

@antoinebou12

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions