Fix invalid metric name when editing graph metrics