Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Nov 3, 2020
1 parent 647a336 commit e8478f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import moment from 'moment-timezone';
import { i18n } from '@kbn/i18n';
import { ExpressionFunctionDefinition, Datatable } from 'src/plugins/expressions/public';
import { DataPublicPluginStart } from 'src/plugins/data/public';
import { parseInterval } from 'src/plugins/data/common';
import { search } from '../../../../../src/plugins/data/public';

type TimeScaleUnit = 's' | 'm' | 'h' | 'd';

Expand Down Expand Up @@ -115,7 +115,7 @@ export function getTimeScaleFunction(data: DataPublicPluginStart) {

const targetUnitInMs = unitInMs[targetUnit];
const timeInfo = await data.search.aggs.getDateMetaByDatatableColumn(dateColumnDefinition);
const intervalDuration = timeInfo && parseInterval(timeInfo.interval);
const intervalDuration = timeInfo && search.aggs.parseInterval(timeInfo.interval);

if (!timeInfo || !intervalDuration) {
throw new Error(
Expand Down

0 comments on commit e8478f9

Please sign in to comment.