It would be really nice to add support in the new Charts extension for SPARQL request to retrieve data.
I used this feature with the previous extension. One can see one example here: https://fr.wikipedia.org/wiki/Mod%C3%A8le:D%C3%A9sint%C3%A9gration_du_neutron_libre/Dur%C3%A9e_de_vie_moyenne_du_neutron
Another example from T396269: population graphs on euwiki doing sparql queries on the old Graphs bit:
as in
``
{{biztanleria grafiko automatikoa|barrak=14}}
``
Most likely best way to implement this is by exposing WDQS queries to Lua via Extension:ExternalData or similar, see also REST needs for T393500