ioBroker/ioBroker.lovelace

Missing data with cusom:apexcharts-card

Opened this issue · 2 comments

I recognized missing history data when using the custom apexchart-card. Several recent hours of history are not displayed correctly.

Hard refresh (Strg+F5) doesn't help.

Same on different browsers and Android. Since the history lags are different on different browsers, I assumed it's a matter of caching. So I was able to reveal the correct data by clearing the cache (chrome://settings/content/siteDetails?site=http...).

The strange thing is that it works correctly in edit mode (see screenshot).

2024-04-16 19_04_16

Versions:

  • Adapter version: 4.1.8
  • JS-Controller version: 5.0.19
  • Node version: 18.20.2
  • Operating system: Windows 11 / Android 14
  • apexchart-card: 2.0.4

used config:

type: custom:apexcharts-card
update_interval: 5m
header:
  show: true
  title: apexcharts-card
  show_states: true
  colorize_states: true
graph_span: 17h
span:
  end: day
  offset: '-2h'
show:
  last_updated: true
now:
  show: true
  color: green
all_series_config:
  group_by:
    func: avg
    duration: 10m
  unit: ' W'
  float_precision: 0
  show:
    name_in_header: false
    legend_value: false
    in_header: false
series:
  - entity: sensor.pv_leistung
    color: green
    type: line
    stroke_width: 3
    name: heute
    extend_to: now
    show:
      header_color_threshold: false
      extremas: true
apex_config:
  chart:
    height: 200px
  legend:
    show: false
yaxis:
  - min: 0
    max: ~800
    decimals: 0
    apex_config:
      tickAmount: 2

Try to increase the parameter for maximum data points from history. It is in instance settings, where you select from what adapter to get the history.
I am not sure why it works in edit mode. But usually that is the problem.

increase the parameter for maximum data points

I tried that, but it didn't work either.

But I finally found the solution or lets say a workaround: the "cache" parameter has to be set to false, then it works as it should. However, I wonder how this setting affects performance.