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