Correct, but the reason I would need to change the generator is that I need extrema on a per-day basis. Do achieve this, I would split the data-generator in 2 series
That is why I have 2 cards, for tomorrow it is conditional card showing only when tomorrow prices are available And using Nordpool integration I have anyway different tags (today/tomorrow) in attributes…
Best, JR
I am trying to make a stacked barchart where the left side images stack on tope of each other. But if you look when I enable both they seem to be in front/behind each other instead. Below is my image an code. I’m curious if anyone else has seen this behavior or if something in my config is causing it?
- type: "custom:apexcharts-card"
yaxis:
- id: a
- id: b
opposite: true
stacked: true
header:
title: Downstairs HVAC
show: true
show_states: false
series:
- entity: sensor.yearly_downstairs_ac
yaxis_id: a
color: LightSkyBlue
data_generator: |
let res = [];
for (const [key, value] of Object.entries(entity.attributes)) {
let d = new Date(key).getTime();
if (d > 0)
res.push([d, value]);
}
return res.sort((a, b) => { return a[0] - b[0] });
type: column
- entity: sensor.yearly_downstairs_heat
yaxis_id: a
color: LightCoral
data_generator: |
let res = [];
for (const [key, value] of Object.entries(entity.attributes)) {
let d = new Date(key).getTime();
if (d > 0)
res.push([d, value]);
}
return res.sort((a, b) => { return a[0] - b[0] });
type: column
- entity: sensor.yearly_temps
yaxis_id: b
color: LightGray
data_generator: |
let res = [];
for (const [key, value] of Object.entries(entity.attributes)) {
let d = new Date(key).getTime();
if (d > 0)
res.push([d, value]);
}
return res.sort((a, b) => { return a[0] - b[0] });
type: line
graph_span: 30days
apex_config:
bar:
columnwidth: 100%
all_series_config:
stroke_width: 2
Thanks, that is unfortunate, sounds like it can’t really be fixed. I may try the plotly card, but I think this one looks a bit more visually polished from the get go.
Hello, is there a way to make only one of the series solid and the other stroke?
Also, I need to make the outer radial bar’s track gradiently transparent.
Stills truggeling on how to get a a marker on hte very last datapoint. Need to find the last dataPointIndex to replace the “62” in my code below. No one that has run into the same problem before?
Not sure what you are trying to say? I have googled like crazy and haven’t found a native way but adding the dataPointIndexes in an array and picking the highest one should be doable, that’s why i asked if anyone had a tried something clever.
But I’ll look into something other impossible to focus on, I have quite a list of cool (and impossible) things to spend time on
is it possible to control the order of drawing of the series?
I have an area and column chart on one plot with two axes and would like the columns to be behind. Whatever order I define the series, the columns are always on top.