Using Javascript to make interactive plots

Hi,

I wanted to ask if there exist any ready-to-use scripts for creating interactive plots with JS. What I mean by interactive, is, for example, if you have a plot with 5 histogram bars, each of which could correspond to, let’s say, the number of people in a school (say schools 1,2,3,4 and 5) , one could select, by ticking a checkbox on a list outside the plot, which of the bars (schools) would be visible in the plot and which not.

Google provides a wide range of good charts. Here’s an interactive example https://developers.google.com/chart/interactive/docs/examples#interaction_example

The main idea is that when something happens (a table is sorted, a button is clicked, a checkbox is checked, etc…) that you update the data, and redraw the chart.