Improve the assert error message to use regex to allow for a more succinct style.
Greatly reduce duplication in most of the chart definition classes by extracting common scale declaration functions into common builder functions.