A Stock Market Analysis Dashboard built using HTML, CSS, JavaScript, Bootstrap, and Chart.js.
This project visualizes stock market data, displays stock statistics, and generates interactive charts for popular companies.
โ
Real-Time Stock Data โ Fetches live-like stock statistics from an external API.
โ
Dynamic Chart Generation โ Displays stock price trends over multiple timeframes using Chart.js.
โ
Stock Summary Section โ Shows key stock insights and summaries.
โ
Responsive Design โ Built with Bootstrap for clean, mobile-friendly layout.
โ
Interactive UI โ Users can click on any stock to view detailed trends and stats.
โ
Custom Timeframes โ Toggle between 1 Month, 3 Months, 1 Year, and 5 Years charts.
๐ฆ Stock-Market-Analysis โโโ index.html # Main HTML file (structure of the web page) โโโ index.js # JavaScript logic (API fetch, chart rendering, interactivity) โโโ index.css # Styling for the app layout โโโ README.md # Project documentation
The app retrieves data from a custom backend hosted on Render:
| Purpose | API Endpoint |
|---|---|
| Stock Statistics Data | https://stock-market-api-k9vl.onrender.com/api/stocksstatsdata |
| Stock Historical Data | https://stock-market-api-k9vl.onrender.com/api/stocksdata |
| Stock Profile Summary | https://stock-market-api-k9vl.onrender.com/api/profiledata |
| Library | Purpose | CDN / Source |
|---|---|---|
| Bootstrap 5.3.3 | For responsive layout and UI styling | jsDelivr CDN |
| Chart.js | To render interactive line charts | jsDelivr CDN |
No additional build tools or frameworks are used โ everything runs directly in the browser.
- The app fetches stock symbols (
AAPL,MSFT,GOOGL, etc.) - Displays Book Value and Profit % in a clean list format.
- Clicking on a stock loads its historical price chart using Chart.js.
- Displays highest and lowest price points dynamically.
- Users can switch between multiple timeframes:
- 1 Month
- 3 Months
- 1 Year
- 5 Years
- Additional details like company summary are displayed in a dedicated section below the chart.
Sections:
- ๐ Header โ Displays the app title.
- ๐ Chart Section โ Shows real-time stock chart and stats.
- ๐ Timeframe Buttons โ Lets users change data range.
- ๐ Stock List โ Lists all available stock tickers with stats.
- ๐งพ Details Section โ Displays stock summary and insights.
| Function | Description |
|---|---|
fetchStockData() |
Fetches stock statistics for each symbol. |
displayStockData() |
Renders the stock list with book value and profit. |
createStockChart(symbol) |
Generates Chart.js line chart for selected stock. |
updateTimeframe(timeframe) |
Updates chart data based on selected timeframe. |
renderstockData(symbol) |
Fetches and displays stock profile summary. |
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Framework: Bootstrap 5
- Visualization: Chart.js
- Data Source: Custom Render-hosted API
- Runtime: Client-side only (no Node.js required)
git clone https://github.com/yourusername/stock-market-analysis.git