Howdy team!
I’ve got a graph card that I would really love to add the current value to the leading edge / ‘now’ for each entity / line.
Any ideas how how / if this can be achieved? I’ve had a bit of a play around with apex_config options but haven’t had much luck unfortunately.
Any pointers in the right direction would be greatly appreciated!
AleXSR700
(Alex)
September 14, 2023, 4:32pm
3094
I just saw the experimental brush
feature and am quite fond of it.
Can anybody tell me if there is a trick to formatting the y-axis?
As you can see, the y-axis range is defined by the entity with the highest values (in this case the yellow peaks in the bottom graph).
But the blue line has a max of 129 W but is shown in the range of > 2000 W.
Any ideas?
KKlausl
(KKlausl)
September 14, 2023, 8:48pm
3095
I´m no expert - but it works for me - using the code, where “yaxis” is above “apex_config” and this above “forceNiceScale”
that “min” is not possible - when logarithmic is enabled - seems like a bug, cause other chart programs (as grafana) are working good here… but I coud help myself with two yaxis maybe…
Has anyone been able to sort their data series?
On this chart of environmental sensor batteries…
…I would like to be able to sort by lowest to highest battery level, but cannot find a configuration parameter on the apexcharts radial bar site .
AleXSR700
(Alex)
September 17, 2023, 8:29pm
3098
You could maybe add the entities using templating and use that to “create” the list of entities in the order of state.
BenSchmidt
(Ben Schmidt)
September 18, 2023, 11:00am
3099
I am trying to get a total in a donut chart of three values added together in my donut-diagram, so 1822 (W) in my case
According to apexcharts this is done by setting lables to true, it never did the trick for me.
type: custom:apexcharts-card
chart_type: donut
header:
show: true
show_states: true
colorize_states: true
title: Current PV
series:
- entity: sensor.balcony_solar_power
name: Balcony
type: column
color: lightgreen
float_precision: 0
- entity: sensor.deye_12k_pv1_power
name: Garage
type: column
color: orange
- entity: sensor.deye_12k_pv2_power
name: West roof
type: column
color: lightblue
natbesh
(Nate Besh)
September 19, 2023, 12:54am
3100
Having issues with data generator…
Here’s the sensor data - “sensor.solcast_pv_forecast_forecast_today”:
Attributes:
DetailedForecast
period_start: ‘2023-09-18T00:00:00+10:00’
pv_estimate: 0
pv_estimate10: 0
pv_estimate90: 0
period_start: ‘2023-09-18T00:30:00+10:00’
pv_estimate: 0
pv_estimate10: 0
pv_estimate90: 0
(there’s zeros for values there, but the data has actual numbers/floats later on in the series)
Here’s the data generator section:
data_generator: |
return entity.attributes.detailedforecast.map((entry) => {
return [new Date(entry.period_start), entry.pv_estimate];
});
And here’s what i’m seeing - no graph lines - but data in the headers:
webwude
(Webwude)
September 20, 2023, 3:54pm
3102
I have the same question / issue with the now line shifted to the right. Any idea?
This is what I use to get a total in the centre:
Its the section in plotOptions
that does it
- type: custom:apexcharts-card
chart_type: donut
update_interval: 3s
header:
show: false
show_states: false
apex_config:
chart:
height: 405px
stroke:
width: 1
legend:
show: false
dataLabels:
enabled: true
style:
fontSize: 10px
dropShadow:
enabled: false
formatter: >
EVAL: function (value, opt) {
return opt.w.config.labels[opt.seriesIndex] + ": " + opt.w.config.series[opt.seriesIndex].toFixed(0) + " " + " W" ;
}
plotOptions:
pie:
donut:
size: "40%"
dataLabels:
minAngleToShowLabel: 0.5
labels:
show: true
total:
show: true
label: Total
formatter: |
EVAL:function(w) {
return w.globals.seriesTotals.reduce((a, b) => {return (a + b)} , 0).toFixed(0) + " W"
}
1 Like
@Holdestmade any idea how to link the center-value to an existing entity to show history/stats?
turboc
(Chip Cox)
September 22, 2023, 1:26am
3106
I’ve got something bizarre. I just put moved three graphs into a grid. Making a layout for my phone. All looks great, but the graphs on my laptop and the graphs on my phone show different durations of data. My laptop shows about the past two weeks worth of data while my phone shows the past month and a half. They are both running against the same lovelace file. Right? The phone is using the HA ios app. The laptop is running chrome. I just created the dashboard tonight so it shouldn’t be old data. Any ideas???
natbesh
(Nate Besh)
September 22, 2023, 1:41am
3107
actually needed to be: “detailedForecast”
Caps didnt match attributes for some odd reason
Strip
(As is)
September 22, 2023, 4:36am
3108
Would it be possible to show only hours in the bottom axle? As 01, 02, 03, … instead of 01:00, 02:00, 03:00, …
Sorry, found it by RTM:
apex_config:
xaxis:
labels:
format: HH
BenSchmidt
(Ben Schmidt)
September 22, 2023, 10:16am
3109
This did the trick, thank you!
For completeness
type: custom:apexcharts-card
chart_type: donut
header:
show: true
show_states: true
colorize_states: true
title: Current PV
apex_config:
plotOptions:
pie:
donut:
size: 60%
labels:
show: true
total:
show: true
label: Total W
formatter: |
EVAL:function(w) {
return w.globals.seriesTotals.reduce((a, b) => {return (a + b)} , 0).toFixed(0) + " W"
}
series:
- entity: sensor.balcony_solar_power
name: Balcony
type: column
color: lightgreen
float_precision: 0
- entity: sensor.deye_12k_pv1_power
name: Garage
type: column
color: orange
float_precision: 0
- entity: sensor.deye_12k_pv2_power
name: West roof
type: column
color: lightblue
float_precision: 0
SteveReg
September 24, 2023, 7:40pm
3110
Hi all,
I’m trying to replicate the statistics change function from the Statistics graph Card.
I’ve installed the apexchart beta version via HACS (v2.0.4-dev.1 ).
In the beta documentation its described as:
statistics:
type: min, max, mean, sum, state, or change
period 5minute, hour, day or month
align: start, end or middle
Unfortunately after installing it i get the error message below:
As of right now i’ve found no information about statistics change function in this thread.
Every input is much appreciated.
type: custom:apexcharts-card
graph_span: 1week
locale: de
stacked: true
all_series_config:
type: column
statistics:
type: change
period: day
align: middle
show:
datalabels: true
apex_config:
chart:
stacked: true
dataLabels:
enabled: true
background:
enabled: false
style:
colors:
- white
dropShadow:
enabled: true
left: 2
blur: 1
color: black
plotOptions:
bar:
borderRadius: 5
horizontal: false
rangeBarOverlap: true
dataLabels:
position: center
grid:
show: false
tooltip:
enabled: false
legend:
show: false
xaxis:
labels:
datetimeFormatter:
day: ddd
axisBorder:
show: false
axisTicks:
show: false
tooltip:
enabled: false
yaxis:
show: false
series:
- entity: sensor.flur_verbrauch_total_active_energy
name: Verbaucht gesamt
- entity: sensor.flur_verbrauch_phase_a_total_active_energy
name: Verbaucht a
- entity: sensor.flur_verbrauch_phase_b_total_active_energy
name: Verbaucht b
- entity: sensor.flur_verbrauch_phase_c_total_active_energy
name: Verbaucht c
denniz78
(Dennis de Leest)
September 25, 2023, 1:51pm
3111
Hi Martijn ,
facing the same issue , may I ask to which sensor you switched ?
thx Dennis
vingerha
September 25, 2023, 2:09pm
3112
204dev1 is prior to 204 as I read it, where did you find the doc on the ‘change’?
SteveReg
September 25, 2023, 2:44pm
3113
Do you ask where i found the Documentation for v2.0.4-dev.1 ?
If so: