π Charts
The Charts page provides a visual summary of voting results for each session. These charts are generated server-side using Matplotlib and reflect a static snapshot of the voting data at the time of the request. They offer a clear, visual interpretation of how votes were distributed during the session.
Currently, four types of charts are supported:
π¦ 1. Bar Chart β Votes per Option
Displays the total number of votes each Option received in a given voting session.
Use case: Quickly compare Option popularity by count.
πͺ 2. Pie Chart β Vote Share by Option
Shows each Optionβs share of the total votes as a percentage.
Use case: Understand vote distribution at a glance.
π© 3. Line Chart β Voting Activity Over Time
Plots the number of votes cast over time within a session.
Use case: Spot peaks and patterns in voter activity.
π¨ 4. Turnout Chart β Voted vs Registered Users
Compares how many registered users actually voted in the session.
Use case: Measure overall participation and engagement.
π Where to View Charts
Charts are available during and after a voting session.
Live example:
https://iovote.onrender.com/voting_sessions/session/2/charts/
Replace
2
with the ID of any voting session.
Relative path (for developers):
/voting_sessions/session/
πΌοΈ Chart Previews (Optional)
You may include screenshots of each chart type here for documentation or PDF purposes.
To enable once images are added:
Example Previews
π οΈ Technical Notes
- Charts are generated using Matplotlib on the Django backend.
- They are returned as static PNG images embedded in the results page.
- No JavaScript or interactivity is used β this keeps the charts lightweight and server-driven.
π Future Enhancements
- Introduce interactive charts using JavaScript libraries (e.g., Chart.js, Plotly)
- Enable image or PDF export of individual charts
- Add multi-session comparisons for analytics
Need help extending chart features or including visuals in your PDF documentation? Just let us know.