added legend
added legend js