(index)
| 601 | } |
| 602 | |
| 603 | function makeColor(index) { |
| 604 | // Rotate hue around a circle. Multiple by phi to spread things |
| 605 | // out better. Use 50% saturation to make subdued colors, and |
| 606 | // 80% lightness to have good contrast with black foreground text. |
| 607 | const PHI = 1.618033988; |
| 608 | const hue = (index+1) * PHI * 2 * Math.PI; // +1 to avoid 0 |
| 609 | const hsl = `hsl(${hue}rad 50% 80%)`; |
| 610 | return hsl; |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | // pprofUnitText returns a formatted string to display for value in the specified unit. |
no outgoing calls
no test coverage detected
searching dependent graphs…