diff --git a/src/web/questions/components/HistoryChart.tsx b/src/web/questions/components/HistoryChart.tsx index 852140f..a5e0600 100644 --- a/src/web/questions/components/HistoryChart.tsx +++ b/src/web/questions/components/HistoryChart.tsx @@ -269,13 +269,15 @@ export const HistoryChart: React.FC = ({ question }) => { // tickFormat specifies how ticks should be displayed tickFormat={(x) => `${x * 100}%`} /> - { - dataSets - .map((dataSet, i) => - getVictoryGroup({ data: dataSet, i, highlight: i === highlight }) - ) - .reverse() // affects svg render order, we want to render largest datasets on top of others - } + {[...Array(MAX_LINES).keys()] + .reverse() // affects svg render order, we want to render largest datasets on top of others + .map((i) => + getVictoryGroup({ + data: dataSets[i], + i, + highlight: i === highlight, + }) + )} ({ name, color: colors[i] }))}