put history_chart loader back in

pull/2404/head
slightlycyborg 5 years ago
parent 23019ba2a2
commit 10d67d4d44
  1. 5
      apps/block_scout_web/assets/js/lib/history_chart.js

@ -4,6 +4,7 @@ import humps from 'humps'
import numeral from 'numeral'
import { formatUsdValue } from '../lib/currency'
import sassVariables from '../../css/app.scss'
import { showLoader } from '../lib/utils'
const config = {
type: 'line',
@ -184,6 +185,9 @@ export function createMarketHistoryChart (el) {
const dataConfig = $(el).data('history_chart_config')
const $chartLoading = $('[data-chart-loading-message]')
const isTimeout = true
const timeoutID = showLoader(isTimeout, $chartLoading)
const $chartError = $('[data-chart-error-message]')
const chart = new MarketHistoryChart(el, 0, [], dataConfig)
Object.keys(dataPaths).forEach(function (historySource) {
@ -209,6 +213,7 @@ export function createMarketHistoryChart (el) {
})
.always(() => {
$chartLoading.hide()
clearTimeout(timeoutID)
})
})
return chart

Loading…
Cancel
Save