Skip to content

Commit 17c80d5

Browse files
Apply mod while indexing on globals.COLORS (#219)
1 parent 6718277 commit 17c80d5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ const utils = {
4646
},
4747

4848
color: function (data: FunctionPlotDatum, index: number): string {
49-
return data.color || globals.COLORS[index].hex()
49+
let indexModLenColor = index % globals.COLORS.length
50+
return data.color || globals.COLORS[indexModLenColor].hex()
5051
}
5152
}
5253

0 commit comments

Comments
 (0)