typescript-tradingview-embed
Version:
Typescript Component for TradingView Embeds
20 lines • 896 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var EmbedSymbolInfoChart = function (elementId, symbol, width, locale, colorTheme, referral_id, isTransparent) {
if (document.getElementById(elementId) && document.getElementById(elementId).innerHTML === "") {
var script = document.createElement('script');
script.src = 'https://s3.tradingview.com/external-embedding/embed-widget-symbol-info.js';
script.async = true;
script.innerHTML = JSON.stringify({
symbol: symbol,
width: width,
locale: locale,
colorTheme: colorTheme,
referral_id: referral_id,
isTransparent: isTransparent
});
document.getElementById(elementId).appendChild(script);
}
};
exports.EmbedSymbolInfoChart = EmbedSymbolInfoChart;
//# sourceMappingURL=TradingViewEmbed.js.map