Help with Arrays and their updation
Unanswered
Sun bear posted this in #help-forum
Sun bearOP
Hello,
I am making a project in which im displaying a line graph based on the stock aggregates.
i have written the code for the graph which works fine.
The problem is that im trying to update an array which has all the stock aggregates so that the graph component can access it and plot the neccessary changes.
My code is attached in the image.
What's happening is that the array is getting updated, but the same elements are added twice.
For example, if the original array was of size 2, and then i manipulated some of the stock prices, the new updated array should be of size 3, but instead it shows up as size 4 and the last 2 elements are the same. This happens continuously resulting in double the array size than what's required and thus causing my graph to be plotted 2 times for the same point.
Please help,
thanks in advance :)
I am making a project in which im displaying a line graph based on the stock aggregates.
i have written the code for the graph which works fine.
The problem is that im trying to update an array which has all the stock aggregates so that the graph component can access it and plot the neccessary changes.
My code is attached in the image.
What's happening is that the array is getting updated, but the same elements are added twice.
For example, if the original array was of size 2, and then i manipulated some of the stock prices, the new updated array should be of size 3, but instead it shows up as size 4 and the last 2 elements are the same. This happens continuously resulting in double the array size than what's required and thus causing my graph to be plotted 2 times for the same point.
Please help,
thanks in advance :)