Hmm. SQLite and PostgreSQL sort the study names in the opposite order to one another. Swapped them so that it works OK with SQLite; need to change how I do the test so that it is database-agnostic. References issue #686
The chart options include the ability to state how you want the chart data ordered, so I'd like to keep the ordering in. However, this may be creating a rod for my own back. New commit coming up.
Added check for SQLite database to help with data order; assumes all other databases will sort strings in the same way that my PostgreSQL does; may be more sensible to bin the idea of worrying about this and just use Counter, as suggested by Ed. References issue #686