Question about de scaling of the yaxis. For de voltage per phase I monitor the min and max each day.
Normally the chart looks like the picture below.
A few days ago there was a problem on grid and now the chart is a littlebit ugly.
I could filter the value away with “filter” but that is not what is want, because then i lose the ‘information’. I tried a few settings on this page Layout.yaxis in Python, but without succes.
Is it possible to ignore the low for the autorange and use a fixed value instead?
- type: custom:plotly-graph
view_layout:
grid-area: plotly_fase_V_info
entities:
- entity: sensor.electricity_meter_spanning_fase_l1
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
shape: spline
color: rgba(250, 165, 0, 1) #FAA500
yaxis: "y1"
fill: none
statistic: max
name: L1
period: day
filters:
- map_y: parseFloat(y)
- filter: i>0
legendgroup: L1
- entity: sensor.electricity_meter_spanning_fase_l1
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
shape: spline
color: rgba(250, 165, 0, 1) #FAA500
yaxis: "y1"
fill: tonexty
fillcolor: rgba(250, 165, 0, 0.2) #FAA500
statistic: min
name: L1L
period: day
filters:
- map_y: parseFloat(y)
- filter: i>0
legendgroup: L1
showlegend: false
- entity: sensor.electricity_meter_spanning_fase_l2
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
shape: spline
color: rgba(250, 140, 0, 1) #fa8c00
yaxis: "y1"
fill: none
statistic: max
name: L2
period: day
filters:
- map_y: parseFloat(y)
- filter: i>0
legendgroup: L2
- entity: sensor.electricity_meter_spanning_fase_l2
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
shape: spline
color: rgba(250, 140, 0, 1) #fa8c00
yaxis: "y1"
fill: tonexty
fillcolor: rgba(250, 140, 0, 0.2) #fa8c00
statistic: min
name: L2L
period: day
filters:
- map_y: parseFloat(y)
- filter: i>0
legendgroup: L2
showlegend: false
- entity: sensor.electricity_meter_spanning_fase_l3
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
fill: none
line:
shape: spline
color: rgba(250, 190, 0, 1) #fabe00
yaxis: "y1"
statistic: max
name: L3
period: day
filters:
- map_y: parseFloat(y)
- filter: i>0
legendgroup: L3
- entity: sensor.electricity_meter_spanning_fase_l3
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
shape: spline
color: rgba(250, 190, 0, 1) #fabe00
yaxis: "y1"
fill: tonexty
fillcolor: rgba(250, 190, 0, 0.2) #fabe00
statistic: min
name: L3L
period: day
filters:
- map_y: parseFloat(y)
- filter: i>0
legendgroup: L3
showlegend: false
- entity: ""
name: Max
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
color: rgba (255, 0, 0, 1) #ff0000
# showlegend: false
x: [0, "$ex Date.now()"]
y: [253, 253]
yaxis: "y1"
- entity: ""
# https://github.com/dbuezas/lovelace-plotly-graph-card/discussions/311
name: Min
texttemplate: "%{y:.3f}"
hovertemplate: "%{y:.0f}V"
textfont:
size: 8
color: "#ffffff"
line:
color: rgba (255, 0, 0, 1) #ff0000
# showlegend: false
# visible: legendonly
x: [0, "$ex Date.now()"]
y: [207, 207]
yaxis: "y1"
autorange_after_scroll: true
layout:
title: Spanning fase min/max
barmode: relative
height: 500
yaxis: #https://plotly.com/python/reference/layout/yaxis/
# https://github.com/dbuezas/lovelace-plotly-graph-card/discussions/329
# autorange: true
# autorangeoptions:
# clipmin: 200
# clipmax: 260
# minallowed: 200
# maxallowed: 260
# minallowed: 200
# maxallowed: 260
# range:
# - 200
# - 260
fixedrange: true
xaxis:
showgrid: false
hoverlabel:
align: auto
hovermode: x unified
dragmode: pan
hours_to_show: 120d