I have included a LineChartView package in my project, and it works fine out of the package. https://github.com/Jonathan-Gander/LineChartView. However, I have only found that I can only add/change the data in the initializer of the array.
What I would like to do is to add a button where I can append/the next element to the data array. I know how to add a button and do any associated logic, however, being relatively new to Swift, I am not sure where to add the code in the ContentView file to modify the data.
If I add a function for my logic to ContentView, I have not found a way to change the data array in the ContentView struct since the scope in my function has no access to it.
Can someone please help guide me on how to append data to the "data" array in the ContentView.
Thank you