-
How to have x_min greater than what's computed with hours_to_show ? That's because I am plotting a 'sliding delta' to observe energy consumption evolution over a year. The result is that I get a plot on the right half of x. How to have x starting only one year ago ? type: custom:plotly-graph
defaults:
entity:
period: week
showlegend: false
entities:
- entity: sensor.plu_ce_energy
name: Energy
statistic: sum
filters:
- force_numeric
- map_y: y-ys[i-52]
- filter: i>=52
- entity: sensor.tmp_garage_temperature
name: Température
statistic: mean
unit_of_measurement: °C
filters:
- filter: i>52
layout:
yaxis:
title: Energie (kWh)
titlefont:
color: "#1f77b4"
yaxis2:
title: Temp. (°C)
titlefont:
color: "#FF8811"
config:
staticPlot: true
hours_to_show: 2y
refresh_interval: auto
title: 1y Energy |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Try adding range to your xaxis: layout:
xaxis:
range: $ex [Date.now()-1*365*24*60*60*1000, Date.now()] The initial data fetch will be done based on hours_to_show, but plotly will render the specified. |
Beta Was this translation helpful? Give feedback.
Try adding range to your xaxis:
The initial data fetch will be done based on hours_to_show, but plotly will render the specified.