Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix(event-chart): Fixes an issue that the event chart was falsly gett…
Browse files Browse the repository at this point in the history
…ing the pipe for formatting the duration via DI, which resulted in a runtime error in ivy.
  • Loading branch information
ffriedl89 committed Jun 8, 2020
1 parent 2922073 commit 7cbfce6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ import {
DtEventChartOverlay,
} from './event-chart-directives';
import { DtEventChartLegend } from './event-chart-legend';
import {
DtFormattersModule,
DtDuration,
} from '@dynatrace/barista-components/formatters';
import { DtFormattersModule } from '@dynatrace/barista-components/formatters';

export const DT_EVENT_CHART_DIRECTIVES = [
DtEventChart,
Expand All @@ -45,6 +42,5 @@ export const DT_EVENT_CHART_DIRECTIVES = [
exports: DT_EVENT_CHART_DIRECTIVES,
imports: [CommonModule, DtLegendModule, DtOverlayModule, DtFormattersModule],
declarations: [DtEventChartLegend, ...DT_EVENT_CHART_DIRECTIVES],
providers: [DtDuration],
})
export class DtEventChartModule {}
5 changes: 2 additions & 3 deletions libs/barista-components/event-chart/src/event-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ import { dtCreateEventPath } from './merge-and-path/create-event-path';
import { dtEventChartMergeEvents } from './merge-and-path/merge-events';
import { RenderEvent } from './render-event.interface';
import {
DtDuration,
DtTimeUnit,
DtFormattedValue,
formatDuration,
} from '@dynatrace/barista-components/formatters';

const EVENT_BUBBLE_SIZE = 16;
Expand Down Expand Up @@ -257,7 +257,6 @@ export class DtEventChart<T> implements AfterContentInit, OnInit, OnDestroy {
private _appRef: ApplicationRef,
private _injector: Injector,
private _overlayService: Overlay,
private _durationPipe: DtDuration,
@Inject(DOCUMENT) private _document: any,
private _platform: Platform,
private _elementRef: ElementRef<HTMLElement>,
Expand Down Expand Up @@ -840,7 +839,7 @@ export class DtEventChart<T> implements AfterContentInit, OnInit, OnDestroy {
outputUnit = DtTimeUnit.SECOND;
}

return this._durationPipe.transform(timestamp, 'PRECISE', outputUnit);
return formatDuration(timestamp, 'PRECISE', outputUnit);
}
}

Expand Down

0 comments on commit 7cbfce6

Please sign in to comment.