(index, theme='light', colorPalette=CHART_THEME_COLORS)
| 595 | }; |
| 596 | |
| 597 | export function getChartColor(index, theme='light', colorPalette=CHART_THEME_COLORS) { |
| 598 | const palette = colorPalette[theme]; |
| 599 | // loop back if out of index; |
| 600 | return palette[index % palette.length]; |
| 601 | } |
| 602 | |
| 603 | export function getRandomColor() { |
| 604 | return '#' + ((1 << 24) * Math.random() | 0).toString(16).padStart(6, '0'); |
no outgoing calls
no test coverage detected