I ran into the same problem. You can't dynamically switch DataSources for a chart, however, you can re-assign a DataSource to a different query.
I have a chart assigned to DS_1:
On startup, I need to check a flag, and use a different query based on the value of the flag.
Since I can't dynamically switch the DataSource for the chart, I simply switch the query that feeds the DataSource like this:
I hope this helps.