How to rename a metric?

Hi Community, I am trying to use Flux with Grafana (a custom plugin called Flowchart) where the mapping of values is using the metric name - working fine with Influx 1.8 /InfluxSQL whre you rename the metric or Query - but how can I rename a metric in Flux?

from(bucket: “solaranzeige”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “e3dc-rscp.0.EMS.POWER_HOME”)
|> filter(fn: (r) => r[“_field”] == “value”)
|> aggregateWindow(every: 30m, fn: last, createEmpty: false)
|> yield(name: “last”)
the mapping of the plugin is using the metric name: