Fixed legend not disappearing on graph refresh.