chart-line-upCharts Structure

Charts, Graphs, and tickers are mainly powered by TradingView. So it's urgent to know about the structure of these widgets.

Below is sample coding structure:

<!-- TradingView Symbol Overview -->
<div class="tradingview-widget-container__widget card-bs">
    <script>
        ...
    </script>
</div>

<!-- ApexChart -->
<div class="flex mt-2">
    <div class="chart-area"></div>
</div>

TradingView Charts

This guide is designed to help you create a comprehensive stock symbol page using TradingView widgets. This page will provide up-to-date and accurate information about any stock you choose to display. The basic structure for this page will be built using simple HTML, while further functionality will be provided by integrating TradingView’s variety of widgets.

TradingView Ticker Widget

<!-- TradingView Ticker Tape -->
<div class="tradingview-widget-container__widget mb-2 card-bs">
    <script  src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js" async>
        {
        "symbols": [
            {
            "proName": "FOREXCOM:SPXUSD",
            "title": "S&P 500 Index"
            },
            {
            "proName": "FOREXCOM:NSXUSD",
            "title": "US 100 Cash CFD"
            },
            {
            "proName": "FX_IDC:EURUSD",
            "title": "EUR to USD"
            },
            {
            "proName": "BITSTAMP:BTCUSD",
            "title": "Bitcoin"
            },
            {
            "proName": "BITSTAMP:ETHUSD",
            "title": "Ethereum"
            }
        ],
        "showSymbolLogo": true,
        "isTransparent": true,
        "displayMode": "adaptive",
        "colorTheme": "dark",
        "locale": "en"
        }
    </script>
</div>

Customization

Symbol Overview Chart

Customization

If you want to get more details about charts: https://www.tradingview.com/chart/arrow-up-right

circle-exclamation

Apex Charts

After loading all the files, you are ready to build your first chart. To create a chart with minimal configuration, write as follows

circle-info

ApexChartsarrow-up-right is a modern JavaScript library for creating interactive charts and visualizations with an easy-to-use API. For detailed instructions and additional options, please consult the Apex Charts Documentationarrow-up-right.

If you want to get more details about charts: https://apexcharts.com/arrow-up-right

Last updated