Просмотр исходного кода

fix(ddm): Chart series running out of colors (#62369)

ArthurKnaus 1 год назад
Родитель
Сommit
e6ed2e03e7
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      static/app/views/ddm/widget.tsx

+ 1 - 1
static/app/views/ddm/widget.tsx

@@ -281,7 +281,7 @@ export function getChartSeries(
   return sortSeries(series, displayType).map((item, i) => ({
   return sortSeries(series, displayType).map((item, i) => ({
     seriesName: item.name,
     seriesName: item.name,
     unit,
     unit,
-    color: colorFn(colors[i])
+    color: colorFn(colors[i % colors.length])
       .alpha(hoveredLegend && hoveredLegend !== item.name ? 0.1 : 1)
       .alpha(hoveredLegend && hoveredLegend !== item.name ? 0.1 : 1)
       .string(),
       .string(),
     hidden: focusedSeries && focusedSeries !== item.name,
     hidden: focusedSeries && focusedSeries !== item.name,