Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 6e82739

Browse files
committed
Fix D3 type issue
1 parent 7c1f0b9 commit 6e82739

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ui/src/app/analytics/charts/bubble-chart/bubble-chart.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ export class BubbleChartComponent implements OnInit, OnChanges {
140140
return b.value - a.value;
141141
});
142142

143-
const colors = d3.schemeCategory20c;
143+
/**
144+
* 'schemeCategory20c' does not exist in the type definition file but does
145+
* in D3 itself.
146+
*/
147+
const colors = (<any> d3).schemeCategory20c;
144148

145149
const bubble = d3.pack()
146150
.size([widthToUse, heightToUse])

ui/src/app/analytics/charts/pie-chart/pie-chart.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ export class PieChartComponent implements OnInit, OnChanges {
202202
return b.value - a.value;
203203
});
204204

205-
const colors = d3.schemeCategory20c;
205+
/**
206+
* 'schemeCategory20c' does not exist in the type definition file but does
207+
* in D3 itself.
208+
*/
209+
const colors = (<any> d3).schemeCategory20c;
206210

207211
const pie = d3.pie()
208212
.sort(null)

0 commit comments

Comments
 (0)