79552757

Date: 2025-04-03 11:13:50
Score: 1
Natty:
Report link

My solution has been to have the labels and datasets on their own (as normal JS objects, no Vue refs or anything), and an updatedData method that returns the object { labels: labels, datasets: datasets }

Then in the update, push into labels and datasets.data and call chartData.value = updatedData(labels, datasets)

This way it triggers the update without making a copy or restructuring the entire arrays, and without the maximum call stack exceeded error.

I have yet to test if the shallowRef approach works

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Antonio González Carvajal