testcases added for show legend and set start string in both php and js