Add foreignObject for the legends
Merge remote-tracking branch 'origin/master'