I’m unsure if this is a bug in Browser_mod, the Apex cards or if i’m missing anything obvious.
I’m trying to add a a apexcharts card to a browser_mod popup, but when i do the formatting of the chart get “un alligened”
The result should look like this, which it does if i just create the card outside of browser_mod:popup-card
Note the text on pricing in the blue, orange and yellow boxes.
So far so good, but if i add the same into a pop-up card, the result is as follows:
The code used is pasted in here
- theme: Backend-selected
title: Test
path: test
badges: []
cards:
- title: Overblik
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: vertical-stack
cards:
- type: entity
entity: sensor.elpriser_inkl_afgifter
- type: custom:popup-card
entity: sensor.elpriser_inkl_afgifter
dismissable: true
card:
type: vertical-stack
cards:
- type: vertical-stack
cards:
- type: markdown
content: '## Strømpriser'
- type: custom:apexcharts-card
apex_config:
chart:
height: 350px
all_series_config:
unit: ' kr.'
experimental:
color_threshold: true
header:
title: Elpriser pr. time (kr/kWh)
show: true
standard_format: true
show_states: false
colorize_states: true
now:
show: true
label: Now
graph_span: 25h
span:
start: day
offset: '-0h'
yaxis:
- min: 0
apex_config:
tickAmount: 5
series:
- entity: sensor.elpriser_inkl_afgifter
type: column
name: Inkl. afgifter
data_generator: >
var today = entity.attributes.raw_today.map((start, index)
=> {
return [new Date(start["hour"]).getTime(), entity.attributes.raw_today[index]["price"]];
});
if (entity.attributes.tomorrow_valid) {
var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
return [new Date(start["hour"]).getTime(), entity.attributes.raw_tomorrow[index]["price"]];
});
var data = today.concat(tomorrow);
} else {
var data = today
}
return data;
float_precision: 2
color_threshold:
- value: 0
color: green
- value: 2
color: orange
- value: 3.5
color: red
- value: 5
color: darkred
show:
extremas: time
legend_value: false
- entity: sensor.elpriser_excl_afgifter
name: Excl. afgifter
type: line
color: 03a9f4
stroke_width: 4
float_precision: 2
extend_to: false
show:
extremas: true
legend_value: false
data_generator: >
var today = entity.attributes.raw_today.map((start, index)
=> {
return [new Date(start["hour"]).getTime(), entity.attributes.raw_today[index]["price"]];
});
if (entity.attributes.tomorrow_valid) {
var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
return [new Date(start["hour"]).getTime(), entity.attributes.raw_tomorrow[index]["price"]];
});
var data = today.concat(tomorrow);
} else {
var data = today
}
return data;
I have tried searching for a solution, and from what i can understand there have been some issues with formatting in browser_mod, but my understanding is that these should be fixed.
Any suggestions or alternative way to archieve the popup that supports the formatting?