I've got a problem which this snippet demonstrates:
When you click the button, it replaces the textarea with a chart and this works fine. However, when you click that button again, which replaces the chart with another view (the same chart), it throws an error on the call to enable that view.
Oddly, this only happens when there are multiple series on the chart...
This is just a cut down version of what I'm trying to do, and it demonstrates the error.
Can anybody help me understand why it is getting an error?