Skip to content

Commit

Permalink
small fix for test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefarzat committed Jan 17, 2019
1 parent 9d494cf commit 72de7fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/shared/plotly.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class PlotlyService {

public async newPlot(div: HTMLDivElement, data: Plotly.Data[], layout?: Partial<Plotly.Layout>, config?: Partial<Plotly.Config>) {
await this.waitFor(() => this.getPlotly() !== 'waiting');
return this.getPlotly().newPlot(div, data, layout, config).then(instance => PlotlyService.insert(instance)) as Promise<any>;
return this.getPlotly().newPlot(div, data, layout, config).then(() => PlotlyService.insert(div as any)) as Promise<any>;
}

public plot(div: Plotly.PlotlyHTMLElement, data: Plotly.Data[], layout?: Partial<Plotly.Layout>, config?: Partial<Plotly.Config>) {
Expand Down

0 comments on commit 72de7fb

Please sign in to comment.