@diosmosis opened this Issue on June 25th 2020 Member

jqplot is old, our build is custom and it is not marked by exactly what version it is based off of, so it would be a good idea to replace it with something newer. Additionally the normal, non-custom builds do not work with matomo, which is a blocker in both upgrading and switching to getting it from npm. For now we can still use jqplot, but eventually it would be good to switch away from it.

c3 is a similar charting library that is built on d3 and will allow us to quickly and (more) easily switch over to d3.

I created a quick proof of concept to see how much effort integrating c3 would be: https://github.com/matomo-org/matomo/tree/c3-attempt

This creates a new, limited bar graph visualization using c3, without re-using old and bloated jqplot code. We can create c3 visualizations by going through the functionality of old jqplot visualizations and implementing similar functionality and styling to c3.

One limitation I found so far is that c3 does not allow more than 2 y-axes though matomo can show three. There is an issue for this in c3's issue tracker, so they may work on this eventually.

Powered by GitHub Issue Mirror