Easy Chart Pen and Axis Manipulation

I am about to venture into dynamically changing pens and axes in a script. The dataset is proving a little daunting. Is there an example script out there the shows how to grab a dataset from a component property, manipulate the dataset, and update the property with the new dataset? I assume a dataset for a table is handled the same as a pen dataset and an axes dataset.