fix: Scope of y_formatter in diagram widget (close #162)