Second Y-axis remains visible even after removing references and layout
sofkaski opened this issue · 3 comments
Describe the bug
Sequence:
- I made a graph showing statistics on entities and using both primary and secondary Y-axis.
- After some trials I decided to split the graph so that I would not use any more the secondary Y-axis.
- I removed all references to secondary Y-axis and also the layout definition
- Secondary Y axis is still visible. Browser deep refresh with cache clear does not help.
Screenshots
Screenshot after step 3:
yaml
YAML after step 3:
type: custom:plotly-graph
title: Tehot
hours_to_show: 24h
entities:
- entity: sensor.inverter_external_power
name: Verkko
- entity: sensor.inverter_load_power
name: Kuorma
- entity: sensor.inverter_pv1_power
name: Panelit
- entity: sensor.inverter_today_battery_charge
name: Akun lataus
- entity: sensor.inverter_today_battery_discharge
name: Akun purku
layout:
xaxis:
rangeselector:
buttons:
- count: 1
step: minute
- count: 1
step: hour
- count: 12
step: hour
- count: 1
step: day
- count: 7
step: day
yaxis:
fixedrange: true
margin:
r: 100
Additional context
Removed secondary Y-axis is visible also when viewing the card in the companion app in Android phone.
That's because inverter_today_battery_charge has a different unit_of_measurement than the power ones, so this card puts them in a second y axis.
You can force them to use y1 with yaxis: y
, although you wouldn't be able to see those traces since their range is 3 orders of magnitude smaller than that of the other entities.
If you want them to use the second yaxis but not show the axis itself, then google/gpt "how to hide yaxis2 in pltly js"
Ah.. right. I did not pay attention that there was kWh and W. I think I picked wrong entities for the battery.
Closing.