Add/Remove series data

Author: mzupanCreated Jul 13, 2012Updated May 29, 2019

I'm looking to make a chart generator and I have no idea what type of data they will graph. I'm wondering if there is a way to add remove series data from a graph without a refresh or anything. So the line and item in the legend will just show up when there is a new series data added to the array.

I tried to just add it to like graph.series array but it never updated to reflect it.