()
| 180 | } |
| 181 | |
| 182 | function mountChart () { |
| 183 | const chartDom = document.getElementById('chart') |
| 184 | if (chartDom === null) { |
| 185 | return |
| 186 | } |
| 187 | dispose(chartDom) |
| 188 | chart = init(chartDom, { |
| 189 | layout: { |
| 190 | basicParams: { |
| 191 | // yAxisPosition: 'left', |
| 192 | // paneHeight: 200 |
| 193 | }, |
| 194 | panes: [{ type: 'candle' }, { type: 'indicator', content: ['MA'] }] |
| 195 | } |
| 196 | }) |
| 197 | chart.setSymbol({ ticker: 'DEBUG', pricePrecision: 2, volumePrecision: 0 }) |
| 198 | chart.setPeriod(getActivePeriodConfig().period) |
| 199 | chart.setDataLoader(createDataLoader()) |
| 200 | chart.createIndicator('EMA', { pane: { id: 'candle_pane' }, yAxis: { id: 'new' } }) |
| 201 | |
| 202 | // chart.createOverlay('brush') |
| 203 | } |
| 204 | |
| 205 | function bindToolbar () { |
| 206 | document.querySelectorAll('#period-switcher button').forEach(periodButton => { |
no test coverage detected