@dpanscik,
Updating all the occurrence of chart object’s variables names in the example should work fine in your case. Please take a look at this updated JSFiddle where chart object is passed as an argument to copyAxis
function.
—-
Manoj Mohan
Team CanvasJS