ApexCards - Display calculated values

What a wonderful environment and the integration to Lovelace is just super, I trying to use ApexCars instead of Grafana.
My problem is to display a calculated value between first and last datapoint, my simply code is:

type: custom:apexcharts-card
graph_span: 7d
header:
show: true
title: Regn seneste uge
show_states: true
colorize_states: true
series:

  • entity: sensor.tfa_80_0c_rain_total
    name: Regnmængde
    type: line
    data_generator: ‘’

Can anyone help me please? - assuming that I must use the “func” function