|
@@ -27,7 +27,10 @@ tickerSelect.addEventListener('change', async () => {
|
|
|
|
|
|
|
|
async function render() {
|
|
async function render() {
|
|
|
charts.innerHTML = '';
|
|
charts.innerHTML = '';
|
|
|
|
|
+ renderPriceChart(tickerSelect.value, 'NC1');
|
|
|
|
|
+ renderPriceChart(tickerSelect.value, 'CI1');
|
|
|
renderPriceChart(tickerSelect.value, 'IC1');
|
|
renderPriceChart(tickerSelect.value, 'IC1');
|
|
|
|
|
+ renderPriceChart(tickerSelect.value, 'AI1');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function renderPriceChart(ticker: string, cx: string) {
|
|
async function renderPriceChart(ticker: string, cx: string) {
|
|
@@ -40,7 +43,9 @@ async function renderPriceChart(ticker: string, cx: string) {
|
|
|
const maxTraded = Math.max(...filtered.map((t) => t.Traded));
|
|
const maxTraded = Math.max(...filtered.map((t) => t.Traded));
|
|
|
charts.appendChild(Plot.plot({
|
|
charts.appendChild(Plot.plot({
|
|
|
grid: true,
|
|
grid: true,
|
|
|
- y: {axis: 'left', label: 'ICA', domain: [0, maxPrice * 1.1]},
|
|
|
|
|
|
|
+ width: charts.getBoundingClientRect().width / 2 - 10,
|
|
|
|
|
+ height: 400,
|
|
|
|
|
+ y: {axis: 'left', label: cx, domain: [0, maxPrice * 1.1]},
|
|
|
marks: [
|
|
marks: [
|
|
|
Plot.axisY(d3.ticks(0, maxTraded * 2, 10), {
|
|
Plot.axisY(d3.ticks(0, maxTraded * 2, 10), {
|
|
|
label: 'traded',
|
|
label: 'traded',
|