export function getColors()

in desktop/src/@batch-flask/ui/charts/helpers.ts [138:156]


export function getColors(chartType: string, index: number, count: number): Color {
    switch (chartType) {
        case "pie":
        case "doughnut":
            return formatPieColors(generateColors(count));
        case "polarArea":
            return formatPolarAreaColors(generateColors(count));
        case "line":
        case "radar":
            return formatLineColor(generateColor(index));
        case "scatter":
            return formatScatterColor(generateColor(index));
        case "bar":
        case "horizontalBar":
            return formatBarColor(generateColor(index));
        default:
            return generateColor(index) as any;
    }
}