I want to be able to toggle the chart interval via AFL code. Is there a way to do that or do I have to use VBScript?
Yes it is possible. See here:
By the way, finding answer to this question wasn't difficult:
Duplicate: Change chart interval every 20 seconds