Adding tests to the charts module

Related to #2355