Skip to content

Graph does not render when in_chart is set to false #724

@wilfredktlr

Description

@wilfredktlr

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 latest version in my browser console
  • I checked if there is another issue opened with the same problem

Describe the bug
After updating from version 2.0.4 to 2.1.0 the graphs do not render when one of the series has the in_chart set to false. I think it has something to do with this change.

group: config.stacked && serie.type === 'column' ? serie.stack_group : undefined,

Version of the card
Version: 2.1.0

To Reproduce
Create a chart where the value in_chart of one of the series is set to false.

type: custom:apexcharts-card
span:
  start: day
now:
  show: true
header:
  show: true
  show_states: true
  standard_format: true
all_series_config:
  type: column
  float_precision: 1
  stroke_width: 3
  show:
    legend_value: false
yaxis:
  - id: price
    decimals: 1
    max: '|+1|'
    min: '|-1|'
experimental:
  color_threshold: true
series:
  - entity: sensor.entso_e_average_electricity_price_today
    name: Price
    show:
      in_header: false
      extremas: true
    unit: ct
    color_threshold:
      - value: 18
        color: rgb(0, 255, 0)
      - value: 19
        color: rgb(107, 238, 0)
      - value: 20
        color: rgb(149, 219, 0)
      - value: 21
        color: rgb(176, 200, 0)
      - value: 22
        color: rgb(197, 180, 0)
      - value: 23
        color: rgb(215, 159, 0)
      - value: 24
        color: rgb(230, 135, 0)
      - value: 25
        color: rgb(244, 105, 0)
      - value: 26
        color: rgb(252, 71, 0)
      - value: 27
        color: rgb(255, 0, 0)
    yaxis_id: price
    data_generator: |
      return entity.attributes.prices.map((entry) => { 
      return [new Date(entry.time), entry.price * 100];
      });
  - entity: sensor.entso_e_average_electricity_price_today
    name: Price (tomorrow)
    type: area
    offset: +1day
    extend_to: false
    curve: stepline
    show:
      in_header: false
      offset_in_name: false
    unit: ct
    yaxis_id: price
    data_generator: |
      return entity.attributes.prices.map((entry) => { 
      return [new Date(entry.time), entry.price * 100];
      });
  - entity: sensor.entso_e_current_electricity_market_price
    name: Current
    show:
      in_chart: false
    unit: ct
    transform: return x * 100;
  - entity: sensor.entso_e_average_electricity_price_today
    name: Average
    show:
      in_chart: false
    unit: ct
    transform: return x * 100;
  - entity: sensor.entso_e_lowest_energy_price_today
    name: Min
    show:
      in_chart: false
    unit: ct
    transform: return x * 100;
  - entity: sensor.entso_e_highest_energy_price_today
    name: Max
    show:
      in_chart: false
    unit: ct
    transform: return x * 100;

Screenshots
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions