bug fix on chart legend