you type:
[code]your code here[/code]

I don't see how you could have the same issue with my code since it does not select the chart at any point.