@@ -746,9 +772,14 @@ function stackedTopModelsSegments(point: UsagePoint) {
.sort((a, b) => a.segment.value - b.segment.value || a.index - b.index)
}
-function getTopModelsSegmentColor(index: number, muted: boolean, activeSegment: number | undefined) {
- if (activeSegment !== undefined)
- return activeSegment === index ? (usageColors[index] ?? "var(--stats-text)") : "var(--stats-layer-2)"
+function getTopModelsSegmentColor(
+ model: string,
+ index: number,
+ muted: boolean,
+ activeModel: string | undefined,
+) {
+ if (activeModel !== undefined)
+ return activeModel === model ? (usageColors[index] ?? "var(--stats-text)") : "var(--stats-layer-2)"
if (muted) return "var(--stats-layer-2)"
return usageColors[index] ?? "var(--stats-text)"
}
@@ -781,67 +812,49 @@ function formatTokens(value: number) {
return `${Math.round(value * 1000)}B`
}
-function LeaderboardSection(props: { data: StatsHomeData["leaderboard"] }) {
- const [product, setProduct] = createSignal