color_threshold doesn't work anymore when stroke_width is applied #4687
Unanswered
markuswesterberg
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Since I updated the integration I am no longer able set stroke_width for column graphs and at the same time use color_threshold. When I do, the bars/columns become grey, not displaying the color threshold defined. For example, below code used to work well and display well, but now it doesn't:
type: vertical-stack
cards:
content: |
Elpris & konsumtion
entities:
name: Elpris just nu
name: Medelspotpris
name: Förbrukning denna timme
yaxis:
min: ~0
max: 10
apex_config:
tickAmount: 4
decimalsInFloat: 2
opposite: true
min: ~0
max: 400
apex_config:
tickAmount: 4
decimalsInFloat: 2
header:
show: true
title: Elpris och konsumption
show_states: false
colorize_states: false
apex_config:
legend:
show: false
graph_span: 48h
span:
start: day
offset: '-1day'
now:
show: true
label: Nu
experimental:
color_threshold: true
series:
name: Elpris just nu
yaxis_id: price
type: column
color: grey
color_threshold:
color: '#0000ff'
color: '#0015ff'
color: '#002aff'
color: '#0040ff'
color: '#0055ff'
color: '#006aff'
color: '#0080ff'
color: '#0095ff'
color: '#00aaff'
color: '#00c0ff'
color: '#00d5ff'
color: '#00eaff'
color: '#00ffff'
color: '#00ffea'
color: '#00ffd5'
color: '#00ffc0'
color: '#00ffaa'
color: '#00ff95'
color: '#00ff80'
color: '#00ff6a'
color: '#00ff55'
color: '#00ff40'
color: '#00ff2a'
color: '#00ff15'
color: '#00ff00'
color: '#15ff00'
color: '#2aff00'
color: '#40ff00'
color: '#55ff00'
color: '#6aff00'
color: '#80ff00'
color: '#95ff00'
color: '#aaff00'
color: '#c0ff00'
color: '#d5ff00'
color: '#eaff00'
color: '#ffff00'
color: '#ffff00'
color: '#ffff00'
color: '#ffea00'
color: '#ffd500'
color: '#ffc000'
color: '#ffaa00'
color: '#ff9500'
color: '#ff8000'
color: '#ff6a00'
color: '#ff5500'
color: '#ff4000'
color: '#ff2a00'
color: '#ff1500'
color: '#ff0000'
color: '#f80000'
color: '#eb0000'
color: '#e00000'
color: '#d60000'
color: '#cc0000'
color: '#c10000'
color: '#b60000'
color: '#ac0000'
color: '#a10000'
color: '#990000'
color: '#8e0000'
color: '#830000'
color: '#800000'
opacity: 0.8
stroke_width: 7
float_precision: 3
group_by:
func: max
duration: 1h
fill: last
name: Elpris
yaxis_id: price
type: column
data_generator: |
return entity.attributes.raw_today.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
});
color: grey
color_threshold:
color: '#0000ff'
color: '#0015ff'
color: '#002aff'
color: '#0040ff'
color: '#0055ff'
color: '#006aff'
color: '#0080ff'
color: '#0095ff'
color: '#00aaff'
color: '#00c0ff'
color: '#00d5ff'
color: '#00eaff'
color: '#00ffff'
color: '#00ffea'
color: '#00ffd5'
color: '#00ffc0'
color: '#00ffaa'
color: '#00ff95'
color: '#00ff80'
color: '#00ff6a'
color: '#00ff55'
color: '#00ff40'
color: '#00ff2a'
color: '#00ff15'
color: '#00ff00'
color: '#15ff00'
color: '#2aff00'
color: '#40ff00'
color: '#55ff00'
color: '#6aff00'
color: '#80ff00'
color: '#95ff00'
color: '#aaff00'
color: '#c0ff00'
color: '#d5ff00'
color: '#eaff00'
color: '#ffff00'
color: '#ffff00'
color: '#ffff00'
color: '#ffea00'
color: '#ffd500'
color: '#ffc000'
color: '#ffaa00'
color: '#ff9500'
color: '#ff8000'
color: '#ff6a00'
color: '#ff5500'
color: '#ff4000'
color: '#ff2a00'
color: '#ff1500'
color: '#ff0000'
color: '#f80000'
color: '#eb0000'
color: '#e00000'
color: '#d60000'
color: '#cc0000'
color: '#c10000'
color: '#b60000'
color: '#ac0000'
color: '#a10000'
color: '#990000'
color: '#8e0000'
color: '#830000'
color: '#800000'
opacity: 0.8
stroke_width: 7
float_precision: 3
name: Medelspotpris
yaxis_id: price
type: line
curve: stepline
color: blue
stroke_width: 1.5
unit: öre/kWh
float_precision: 2
yaxis_id: value
type: line
color: grey
color_threshold:
color: red
opacity: 1
stroke_width: 1.7
unit: kWh
name: Förbrukning denna timme
float_precision: 2
group_by:
duration: 1h
func: max
fill: zero
Beta Was this translation helpful? Give feedback.
All reactions