For further clarification, I am using this canvasJS guide I have linked below to create my “toggle data series” functionality
Hide Unhide Data Series on Legend Click