Skip to content

Commit d00af98

Browse files
Profiler Teamcopybara-github
authored andcommitted
Update testing file mock charts
PiperOrigin-RevId: 906389077
1 parent 4dd3b1e commit d00af98

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

frontend/app/components/chart/chart.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export class Chart implements OnChanges, OnInit {
4040
}
4141

4242
if (!this.dataInfo || !this.dataInfo.dataProvider) {
43-
this.chart.clearChart();
43+
if (this.chart.clearChart) {
44+
this.chart.clearChart();
45+
}
4446
return;
4547
}
4648

frontend/app/components/overview_page/step_time_graph/step_time_graph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class StepTimeGraph implements AfterViewInit, OnChanges {
6666
const dataTable =
6767
new google.visualization.DataTable(this.inputPipelineAnalysis);
6868
const columnsIds =
69-
dataTable.getTableProperty('step_time_graph_column_ids').split(',');
69+
dataTable.getTableProperty('step_time_graph_column_ids')?.split(',');
7070
let colors = this.columnColors;
7171
this.height = 300;
7272
this.inputPipelineAnalysis.p = this.inputPipelineAnalysis.p || {};
@@ -77,7 +77,7 @@ export class StepTimeGraph implements AfterViewInit, OnChanges {
7777

7878
let i = 0;
7979
while (i < dataTable.getNumberOfColumns()) {
80-
if (!columnsIds.includes(dataTable.getColumnId(i))) {
80+
if (!columnsIds?.includes(dataTable.getColumnId(i))) {
8181
dataTable.removeColumn(i);
8282
continue;
8383
}

0 commit comments

Comments
 (0)