ApexCharts card - A highly customizable graph card

I believe that this should work:

apex_config:
  plotOptions:
    pie:
      startAngle: -90
      endAngle: 90

It’s probably be a bug on my side, I’m going to check. I didn’t try this use case with multiple axis and some series not shown in the chart
Would you mind opening a bug on github please?

1 Like

Add:

type: custom:apexcharts-card
[...]
yaxis:
  - min: 0

Perfect. Thank you!

This chart groups by day using an energy sensor that resets each day to 0 so it takes the max value for that time frame and graphs it. Anyway to get the time off the tooltip? So it just shows Jan 1 2022, Jan 2 2022, without 12:00:00 AM

image

I have searched this tread but didn’t find any solution on what I want to do.

I need do set the color_threshold values dynamically with values from 2 sensor’s. Is this possible? Or is there some workaround to achieve this?

Example…
series:

  • entity: sensor.graphvalue
    color_threshold:
    • value: {{senor.dynamicvalue1}}
      color: green
    • value: {{senor.dynamicvalue2}}
      color: yellow

That should be possible in combination with config-template-card.

2 Likes

Thanks, I’ll check that out.

Is i possible to define the color of each axis (including value)?

I confirm this solution is working also for me, this is great!
Many thanks!!

For some reason “colorize_states: true” does not work, should it put in colors the states? show_states: true"

imagen

like this one
imagen

type: custom:apexcharts-card
graph_span: 2d
span:
  end: day
header:
  show: true
  title: Temperatura
  show_states: true
  colorize_states: true
  standard_format: true
  floating: false
  disable_actions: false
all_series_config:
  fill_raw: last
  curve: smooth
  extend_to_end: false
  show:
    extremas: true
    legend_value: false
    offset_in_name: false
series:
  - entity: sensor.aemet_temperature
    name: Exterior
    color: 1ed797
    stroke_width: 2
    yaxis_id: first
  - entity: sensor.sensor_clima_temperature
    name: Interior cocina
    color: 71c7ec
    stroke_width: 2
    yaxis_id: first
  - entity: sensor.broadlink_rm4_pro_temperature
    name: Interior Salón
    color: 1ebbd7
    stroke_width: 2
    yaxis_id: first
apex_config:
  stroke:
    show: true
  legend:
    show: false
  dataLabels:
    enabled: true
  chart:
    height: 200px
yaxis:
  - id: first
    decimals: 0
    apex_config:
      forceNiceScale: true
      tickAmount: 5
now:
  show: false
  color: white
show:
  last_updated: true

Is there a way to improve the performance of the charts?

Maybe by decreasing the number of data points used to plot?

1 Like

Some questions:

#1 Why is there such a big space between the highest bar and the values above? There is no value saying 2.4 will be the highest in 24h so I dont understand where this is coming from…
image

#2
Is it possible to have one more value in the top area without having it displayed in the chart?

I am trying to chart out a energy usage history graph and while it looks really nice, it tends to take forever to load and seems to want to keep refreshing more than every minute. Is there anyway to optimize this?

type: custom:apexcharts-card
header:
  show: true
  title: ApexCharts-Card
  show_states: true
  colorize_states: true
apex_config:
  chart:
    height: 250px
  update_interval: 1m
all_series_config:
  stroke_width: 1
series:
  - entity: sensor.s31_garage_freezer_energy_power
    name: Freezer
  - entity: sensor.s31_desktop_ups_energy_power
    name: Desktop
  - entity: sensor.s31_washer_energy_power
    name: Washer
  - entity: sensor.s31_dryer_energy_power
    name: Dryer
  - entity: sensor.s31_hotwatercirc_energy_power
    name: Hot Water Pump
  - entity: sensor.s31_espresso_energy_power
    name: Espresso
  - entity: sensor.s31_patio_heater_energy_power
    name: Patio Heater

Is it possible to use the color_threshold with percentual values instead of fixed values?

I would like to split the bars with different colors but now I can only use fixed values like:

color_threshold:
      - value: 0
        color: green
        opacity: 1
      - value: 0.5
        color: yellow
      - value: 1
        color: red

Ideally it would be good with something similar to this:

color_threshold:
      - value: 0%
        color: green
        opacity: 1
      - value: 50%
        color: yellow
      - value: 80%
        color: red

Hello,

thanks for this great card!

By using thr brush funcion ich have the problem, that the yaxis values for min and max are ignored.

Can anyone help me to solve this problem?

Your colors needs to be defined as '#aabbcc' not aabbcc.

It’s fast on a fast computer, but with 10th of thousand of points it starts to slow down, so you can use group_by to reduce the number of points.

Maybe the previous value just before the time displayed on the chart is above the max you see. Also the chart tries to have “nice” values on the y axis. It’s not perfect but you can change the way it works using the yaxis part of the config.

Yes:

series:
  - entity: sensor.xyz
    show:
      in_chart: false

update_interval doesn’t go in apex_config but is a main config option.

That is not possible, but might be a good idea. You can add a feature request on github, I’ll have a look at it.

It should be:

yaxis:
  - id: 1a
    min: 22
    max: 30
    apex_config:
      [...]
1 Like

I have tried your proposal, unfortunately with the same result.

Might be a bug, probably in the library I use. Please open an issue on github and share your config (not a screenshot of your config).

Hi,

I am wondering whether it is possible to have ticks appear at a fixed interval, instead of fixing their number with tickAmount, e.g. every 25 units. I am letting the min/max float free on a chart, but would like the tick separation to stay fixed.

Hi!

Does anyone know how to specify decimals on hover over values?
Below example 0.25 is rounded to 0.3.
I couldn’t find a decimals options for this in the instructions.

hover_value