added missing new js file for legend and metadata