diff --git a/src/components/pages/dashboard/chart/DashboardLineChart.tsx b/src/components/pages/dashboard/chart/DashboardLineChart.tsx index 58749cf2..bfb13d9a 100644 --- a/src/components/pages/dashboard/chart/DashboardLineChart.tsx +++ b/src/components/pages/dashboard/chart/DashboardLineChart.tsx @@ -67,7 +67,7 @@ const lineColors: Record = { act_fcr: '#10B981', std_fcr: '#10B981', act_fcr_cum: '#F52419', - std_fcr_cum: '#10B981', + std_fcr_cum: '#F52419', normal: '#10B981', abnormal: '#F52419', act_deplesi: '#10B981', @@ -659,44 +659,50 @@ const DashboardLineChart = ({ seriesData = comparisonChart?.series || []; } - return seriesData - .filter((series) => visibleSeries.has(series.id)) - .map((series, index) => { - const isStandard = series.id - .toString() - .toLowerCase() - .includes('std'); - // Use series.id directly as dataKey to match dataset fields - const dataKey = series.id.toString(); + return seriesData.map((series, originalIndex) => { + // Skip rendering if series is not visible + if (!visibleSeries.has(series.id)) { + return null; + } - return ( - - ); - }); + const isStandard = series.id + .toString() + .toLowerCase() + .includes('std'); + const dataKey = series.id.toString(); + + return ( + + ); + }); })()} diff --git a/src/components/pages/dashboard/export/DashboardExportCharts.tsx b/src/components/pages/dashboard/export/DashboardExportCharts.tsx index ba0b2fe2..3281dbf8 100644 --- a/src/components/pages/dashboard/export/DashboardExportCharts.tsx +++ b/src/components/pages/dashboard/export/DashboardExportCharts.tsx @@ -66,7 +66,7 @@ const lineColors: Record = { act_fcr: '#10B981', std_fcr: '#10B981', act_fcr_cum: '#F52419', - std_fcr_cum: '#10B981', + std_fcr_cum: '#F52419', normal: '#10B981', abnormal: '#F52419', act_deplesi: '#10B981',