Two price scales
by TradingView
HTML
<script src="https://unpkg.com/[email protected]/dist/lightweight-charts.standalone.production.js"></script>
JavaScript
var chart = LightweightCharts.createChart(document.body, {
width: 600,
height: 300,
rightPriceScale: {
visible: true,
borderColor: 'rgba(197, 203, 206, 1)',
},
leftPriceScale: {
visible: true,
borderColor: 'rgba(197, 203, 206, 1)',
},
layout: {
background: {
type: 'solid',
color: '#ffffff',
},
textColor: 'rgba(33, 56, 77, 1)',
},
grid: {
horzLines: {
color: '#F0F3FA',
},
vertLines: {
color: '#F0F3FA',
},
},
crosshair: {
mode: LightweightCharts.CrosshairMode.Normal,
},
timeScale: {
borderColor: 'rgba(197, 203, 206, 1)',
},
handleScroll: {
vertTouchDrag: false,
},
});
chart.addLineSeries({
color: 'rgba(4, 111, 232, 1)',
lineWidth: 2,
}).setData([{ time: {year: 2018, month: 9, day: 22}, value: 25.531816900940186 },
{ time: {year: 2018, month: 9, day: 23}, value: 26.350850429478125 },
{ time: {year: 2018, month: 9, day: 24}, value: 25.05218443850655 },
{ time: {year: 2018, month: 9, day: 25}, value: 25.41022485894306 },
{ time: {year: 2018, month: 9, day: 26}, value: 25.134847363259958 },
{ time: {year: 2018, month: 9, day: 27}, value: 24.239250761300525 },
{ time: {year: 2018, month: 9, day: 28}, value: 28.8673009313941 },
{ time: {year: 2018, month: 9, day: 29}, value: 27.028082380884264 },
{ time: {year: 2018, month: 9, day: 30}, value: 27.181577793470662 },
{ time: {year: 2018, month: 10, day: 1}, value: 28.658957209998505 },
{ time: {year: 2018, month: 10, day: 2}, value: 30.418392247817536 },
{ time: {year: 2018, month: 10, day: 3}, value: 26.41825183552505 },
{ time: {year: 2018, month: 10, day: 4}, value: 30.0951233353539 },
{ time: {year: 2018, month: 10, day: 5}, value: 30.30985059775389 },
{ time: {year: 2018, month: 10, day: 6}, value: 30.71612555943148 },
{ time: {year: 2018, month: 10, day: 7}, value: 28.222424591003268 },
{ time: {year: 2018, month: 10, day: 8}, value: 31.01149570947896 },
{ time: {year: 2018, month: 10, day: 9}, value:...