2👍
This might be because in
<Line {data} options={{ responsive: true }} />
{data}
is the shorthand for data={data}
In the other cases the variable name is different, so try changing to
<Line data={data2} options={{ responsive: true }} />
<Line data={data_chart} options={{ responsive: true }} />
- Chartjs-How to keep rounded bar corners when data is filtered chartJs?
- Chartjs-Can I color the first bar in "Bart Char" differently?
Source:stackexchange.com