Factor out plot adding and fix issues

Opening this PR ASAP due to https://github.com/OpenTreeMap/OTM2/issues/1717, but it needs more documentation, testing, and integration with other bugfixes.
It may also be worthwhile to roll our own bacon util called `isNumeric` since the lodash function returns true for `NaN`.