state management: Adjusted state to account to accept chart.update as callback