1. Link Analysis (Top Panel)
This uses Cytoscape.js to visualize relationships. In a stock market context, this is used to map:
Supply chain dependencies.
Corporate ownership structures.
Correlation networks (which stocks move together).
2. Candlestick Tool (Bottom Panel)
This uses TradingView's Lightweight Charts.
Green/Red Candles: Standard OHLC (Open, High, Low, Close) visualization.
Live Update: The "Sync" button demonstrates how to inject new data points into the chart in real-time.
3. Region Selection & Export
PNG Export: The JavaScript captures the canvas state of the network graph and downloads it as an image.
PDF Report: The "Export PDF" button triggers a print-media query formatted version of the dashboard.
Interactive Selection: You can click and drag nodes in the Link Analysis section to isolate specific "regions" of the market network.
How to use this for Market Dashboards
To make this "Live," you would replace the updateMarket() function with a fetch() call to a financial API (like Alpha Vantage or Yahoo Finance). The Link Analysis portion can then be updated dynamically based on which companies are mentioned in the news or social media sentiment.
