append_html_chartopts: wasn't using the function's digits arg
add tests of chartOpts -> json
test-chartopts: split into pieces; add another test
test-chartopts: add a few more tests
test-chartopts: delete extraneous white space