querySelector is slow. It's used in quite a lot of places in the code. getElementByClassname and getElementById is a lot faster. Note the API isn't 1:1 but close enough.
e.g. benchmark
p.s. just trying to make Apex work with larger data sets. It's a good charting solution, but maybe 5-10x slower than a lot of similar options. Happy to help optimize all parts of it in any way.