Skip to content

Graphs not displaying any more in 2.2.3 #1015

@Gultak

Description

@Gultak

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser
  • I verified that I'm really running the lastest version in my browser console
  • I checked if there is another issue opened with the same problem

Describe the bug
Since updating to 2.2.3, my graphs are empty.
Reverting back to 2.2.2 fixes the issue.

This is similar to #945, I opened a new bug as the concole logs are different and the last working version is 2.2.2, not 2.1.2.

Version of the card
Version: 2.2.3

To Reproduce
This is the configuration I used:

type: custom:auto-entities
card:
  type: custom:apexcharts-card
  experimental:
    color_threshold: true
  graph_span: 14d
  section_mode: true
  span:
    end: day
  show:
    last_updated: true
  header:
    show: true
    title: Heating Breakdown
    show_states: true
    colorize_states: true
  yaxis:
    - min: 0
      max: ~9
      decimals: 0
      apex_config:
        tickAmount: 5
  apex_config:
    xaxis:
      tooltip:
        enabled: false
  all_series_config:
    show:
      header_color_threshold: true
    type: column
    group_by:
      func: last
      duration: 1d
    color_threshold:
      - value: 0
        color: green
      - value: 2
        color: yellow
      - value: 8
        color: red
filter:
  template: >-
    {% set ENTITIES =
    states|selectattr('entity_id','search','sensor.*_heating_time') -%}
    {%- for ENTITY in ENTITIES -%}
      {{
        { 'entity': ENTITY.entity_id,
          'name': ENTITY.name|regex_replace(' [hH]eating [tT]ime'),
        } }},
    {%- endfor %}
grid_options:
  columns: full

Screenshots
Image

Expected behavior
This is how it looks in 2.2.2 (without the section_mode: true tag):
Image

Desktop (please complete the following information):

  • Browser: Chrome on Linux
  • Version: 142.0.7444.162

Additional context
Error in the Chrome console:

apexcharts-card.js?hacstag=331701152223:950
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'entity')
    at apexcharts-card.js?hacstag=331701152223:950:33571
    at c (apexcharts-card.js?hacstag=331701152223:1:1214774)
    at e.value (apexcharts-card.js?hacstag=331701152223:1:1217512)
    at e.value (apexcharts-card.js?hacstag=331701152223:1:1211765)
    at e.value (apexcharts-card.js?hacstag=331701152223:1:1467757)
    at e.create (apexcharts-card.js?hacstag=331701152223:1:905315)
    at apexcharts-card.js?hacstag=331701152223:1:1473569
    at new Promise (<anonymous>)
    at e.value (apexcharts-card.js?hacstag=331701152223:1:1473374)
    at apexcharts-card.js?hacstag=331701152223:1:1423429

Code linked:

function hc(e, t) {
    return function(o, i, a=e, n=t) {
        var r, s, p;
        const b = Qt(i.seriesIndex, a.series_in_graph, void 0, null == n ? void 0 : n.states[a.series_in_graph[i.seriesIndex].entity]);
        if (!a.series_in_graph[i.seriesIndex].show.in_legend)
            return [];
        if (a.series_in_graph[i.seriesIndex].show.legend_value) {
            let t = Ut.includes(e.chart_type) ? i.w.globals.series[i.seriesIndex].slice(-1)[0] : i.w.globals.series[i.seriesIndex];
            (null === (r = a.series_in_graph[i.seriesIndex]) || void 0 === r ? void 0 : r.invert) && t && (t = -t),
            (null === (s = a.series_in_graph[i.seriesIndex]) || void 0 === s ? void 0 : s.show.as_duration) || (t = ho(t, null == n ? void 0 : n.locale, a.series_in_graph[i.seriesIndex].float_precision));
            const o = "radialBar" === e.chart_type ? "%" : eo(i.seriesIndex, a.series_in_graph, void 0, null == n ? void 0 : n.states[a.series_in_graph[i.seriesIndex].entity]);
            let c = "";
            return c = null == t ? `<strong>${Vt} ${o}</strong>` : (null === (p = a.series_in_graph[i.seriesIndex]) || void 0 === p ? void 0 : p.show.as_duration) ? `<strong>${ro(t, a.series_in_graph[i.seriesIndex].show.as_duration)}</strong>` : `<strong>${t} ${o}</strong>`,
            [b + ":", c]
        }
        return [b]
    }
}

I neither have vehicle-info-card nor any other of the cards mentioned in #945 and linked issues installed, and searching for %apexcharts in my Visual Studio Code integration only yields apexcharts-card.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions