ApexCharts card - A highly customizable graph card

I have a noob question that I’m sure is very simple: how do I use data_generator to force the chart to use server time? I see that it is supported now, but I cannot find an example and I do not know java script. All the examples seem more complex to shift the time or add logic that doesn’t apply to me.

I found this snippet on the GitHub page: data.push([start.getTime()]) but I can’t seem to get it to work. Here is a chart that I am trying to add it to:

type: custom:apexcharts-card
graph_span: 2h
all_series_config:
  stroke_width: 1.5
yaxis:
  - id: temp
    decimals: 0
    min: ~90
    max: ~101
series:
  - entity: sensor.water_temperature
    yaxis_id: temp
    name: Temp

Hi all,

I have couple of ApexCharts that use some configured values that are stored in helpers. Unfortunately I’m unable to figure out how I can use helper values inside the data_generator code.

Is it even possible with ApexCharts? I also tried wrapping it in a iantrich/config-template-card, but also that doesn’t work for the data_generator code…

Any help is greatly appreciated!
Raymond

Interesting topic, care to share some code and what you want to achieve? One example suffices I guess

EDIT: I use another template card and this works

      data_generator_template: |
        return entity.attributes.{{states('sensor.test')}}.map((entry) => {
              return [new Date(entry.datetime), entry.temperature];
            })

gadgetchnnel/lovelace-card-templater: Custom Lovelace card which allows Jinja2 templates to be applied to other cards