Thanks Pallav, I have sent the code to that email address.
I did find a fix for it which is to change the content of the data generation URL from
&label=a,b,c,d&value=1,2,3,4|-1,-2,-3,-4
to
&label=a,b,c,d&value=1,2,3,4|-1,-2,-3,-4|0
(add a spurious series point at the end)
I'm happy with this fix, but you may want to document it in your online docs.