Views Directory

This directory contains the frontend HTML and JavaScript files for the Competitor Tweet Tracker.

Files

  • index.html: Main HTML template with chart containers and styling
  • charts.js: JavaScript for fetching data and rendering Chart.js visualizations

Features

  • Responsive design using TailwindCSS
  • Interactive charts using Chart.js
  • Automatic color generation for multiple competitors
  • Error handling for data loading failures
  • Real-time data fetching from the API

Chart Types

  1. Daily Chart: Line chart showing tweet mentions over time for each competitor
  2. Total Chart: Bar chart showing total tweet counts per competitor

The charts automatically handle empty data states and dynamically adjust to the number of competitors being tracked.