Skip to content

Commit

Permalink
fix prettier issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Aug 31, 2024
1 parent 7e082dd commit 249a9f9
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions report-viewer/src/utils/ColorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@ import { computed } from 'vue'
* Generates an array of HSL-Colors
* @param numberOfColors Number of colors to generate
*/
function generateHues(
numberOfColors: number
) {
function generateHues(numberOfColors: number) {
const numberOfColorsInFirstInterval = Math.round(
((80 - 20) / (80 - 20 + (340 - 160))) * numberOfColors
) // number of colors from the first interval
const numberOfColorsInSecondInterval = numberOfColors - numberOfColorsInFirstInterval // number of colors from the second interval

const colors: Array<number> = generateColorsForInterval(
20,
80,
numberOfColorsInFirstInterval
)
const colors: Array<number> = generateColorsForInterval(20, 80, numberOfColorsInFirstInterval)
colors.push(...generateColorsForInterval(160, 340, numberOfColorsInSecondInterval))
return colors
}
Expand All @@ -35,7 +29,7 @@ function generateHues(
function generateColorsForInterval(
intervalStart: number,
intervalEnd: number,
numberOfColorsInInterval: number,
numberOfColorsInInterval: number
) {
const hues: Array<number> = []
const interval = intervalEnd - intervalStart
Expand Down

0 comments on commit 249a9f9

Please sign in to comment.