Version: 1.0.0
Vanilla JS Integration
Integrate Backtestx Charts into standard web apps using native HTML/JavaScript scripts and mounting containers.
Overview
Vanilla JS integration offers maximum flexibility and requires no frameworks or extra package bundlers. It compiles into plain javascript code that mounts directly to the browser DOM target.
Inclusion Script
Import the bundle compiled library scripts from a local file directory or static assets bundle:
<script src="./charting_library.js"></script>
Mount Setup
Provide a container target block. Set width and height dimensions inside styles or CSS classes:
<div id="chart-mount" style="width: 100%; height: 500px;"></div>
Initialization
Instantiate the chart constructor, feeding the mount ID and options configuration settings:
<script>
const chart = new window.BacktestxChart('chart-mount', {
symbol: 'BTCUSD',
resolution: '30m'
});
</script>