Update binding.js

Attempting to add legend function