Simply share this ChartJS Widget with you.
The Web App Builder 'dashboard' theme allows you to create graphics and filter them automatically when the map extension changes. The following widget that I created allows, in addition to this (line and vertical bar chart), to select any layer of the Web Map. Dojo class of ChartJS created, the creation of any type of graphic that the library allows is simple in this way.
Since v1.1 => Code cleaned.
Since v1.2 => Chart update; filtering the chart automatically when the 'extent-change' event fires
I build Esri widgets without any -economic- interest, if you find it useful for your projects, you can buy me a coffee