I have a component that queries data from an API and displays a chart, however, toggling the line components on and off triggers another API call due to the toggle states be