When invalid value is set, d3 does not notify where is wrong.
It informs me "Uncaught TypeError: Cannot call method 'apply' of undefined".
This is not kind for developers.
Throw exception when invalid value is set to axis.orient
Probably the more idiomatic behavior is to convert to the default orient when set, if the orient specified isn't one of the known values. (This is similar to CSS, where if you set a style property such as the background-color to an invalid value, the rule is ignored.)
fix .orient() to set default value "bottom" when invalid orient.
Fix for invalid axis.orient. Fixes #905.
Thanks for the pull request. I have pushed a slightly different fix in #1064.