-
Hi Guys, I'm looking for a solution to have the Y axis always starting from zero instead of zooming in and showing only fe. from 5 to 8 on the y axis. The rest of the windows should still zoom in automaticaly as it is now. I would just really want to always see the full Y-axis, fe. from 0 to 8 (if 8 would be the maximum value in the graph). Any suggestions would be apreciated ! Current configuration: type: custom:plotly-graph
time_offset: $fn () => (900000-(Date.now() % 900000 - 3340)).toFixed(0) + 'ms'
defaults:
entity:
show_value: true
entities:
- entity: binary_sensor.capacity_warning
line:
color: lightgray
width: 1
- entity: binary_sensor.capacity_alarm
line:
color: gray
dash: dot
width: 1
- entity: sensor.capacity_limit_current_month
unit_of_measurement: kW
line:
color: yellow
width: 1.5
- entity: input_number.capacity_maximum_quarter_consumption_actual_month
unit_of_measurement: kW
line:
color: gray
dash: dash
width: 1
- entity: sensor.capacity_prognose_current_15_minutes
unit_of_measurement: kW
line:
color: red
width: 1.5
- entity: sensor.grid_imported_energy
line:
color: blue
width: 1.5
layout:
height: 400
margin:
l: 32
r: 35
refresh_interval: 10
hours_to_show: 903340ms |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Fix yaxis range: layout:
yaxis:
range: [0, 8] Other suggestions: time_offset: $ex (900000-(Date.now() % 900000 - 3340)).toFixed(0) + 'ms'
refresh_interval: auto
hours_to_show: 15m |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for your feedback. I changed all as suggested. Only thing I didn't implement is 'hours_to_show: 15m', as I want to show 15m but have to compensate for the time_offset. Please find adapted version below. Problem is : setting the range doesn't seem to change anything. The Y axis is still not starting from zero (unless for periods where there are verry low values in the graphics). Next to that: the maximum of '8' is a problem as, the to of the Y ax would still need to be automatic.. type: custom:plotly-graph
time_offset: $ex (900000-(Date.now() % 900000 - 3340)).toFixed(0) + 'ms'
defaults:
entity:
show_value: true
entities:
- entity: binary_sensor.capacity_warning
line:
color: lightgray
width: 1
- entity: binary_sensor.capacity_alarm
line:
color: gray
dash: dot
width: 1
- entity: sensor.capacity_limit_current_month
unit_of_measurement: kW
line:
color: yellow
width: 1.5
- entity: input_number.capacity_maximum_quarter_consumption_actual_month
unit_of_measurement: kW
line:
color: gray
dash: dash
width: 1
- entity: sensor.capacity_prognose_current_15_minutes
unit_of_measurement: kW
line:
color: red
width: 1.5
- entity: sensor.grid_imported_energy
line:
color: blue
width: 1.5
layout:
yaxis:
range:
- 0
- 8
height: 400
margin:
l: 32
r: 35
refresh_interval: auto
hours_to_show: 903340ms |
Beta Was this translation helpful? Give feedback.
-
Hi, that would indeed be a good work around. Thanks ! |
Beta Was this translation helpful? Give feedback.
I don't think plotly can be configured to set the minimum of a range but leave the max floating.
One Trick you could do is to add a second trace that shared the yaxis and has one datum with a y value of 0. Then you can make it transparent and hide the legend.