1 Commits

Author SHA1 Message Date
Sebastian Seedorf
5c72559e8e fix: remove misleading (NP) suffix from Red column header 2026-06-05 13:01:15 +02:00
3 changed files with 5 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ export default function SignalsChart({
const { containerRef, legendRef } = usePlot(
(el, w, h, lRef) => {
const data = buildSeriesData(rows, config.signal_type, timeMode, config.series_limit);
const data = buildSeriesData(rows, config.signal_type, timeMode);
if (!data) return null;
const { keys, allXs, data: seriesData } = data;

View File

@@ -42,7 +42,7 @@ export default function TableViz({ config, rows, onEdit, onDelete }: Props) {
<th className="text-right px-2 py-1 text-green-400">Green</th>
)}
{config.signal_type !== 'green' && (
<th className="text-right px-2 py-1 text-red-400">Red (NP)</th>
<th className="text-right px-2 py-1 text-red-400">Red</th>
)}
</tr>
</thead>

View File

@@ -1,5 +1,7 @@
import type { SignalRow, ChartConfig, TimeMode } from '@/lib/types';
const MAX_SERIES = 80;
export interface SeriesData {
keys: string[];
allXs: number[];
@@ -10,7 +12,6 @@ export function buildSeriesData(
rows: SignalRow[],
signalType: ChartConfig['signal_type'],
timeMode: TimeMode,
seriesLimit: number = 80,
): SeriesData | null {
const seriesMap = new Map<string, Map<number, number>>();
@@ -33,7 +34,7 @@ export function buildSeriesData(
if (seriesMap.size === 0) return null;
const keys = [...seriesMap.keys()].slice(0, seriesLimit);
const keys = [...seriesMap.keys()].slice(0, MAX_SERIES);
const allXs = [
...new Set(
keys.flatMap((k) => {