Skip to content

Commit 49aa906

Browse files
author
David Buezas
committed
more examples
1 parent 3d8d1a6 commit 49aa906

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

example1.png

19.8 KB
Loading

readme.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,34 @@ refresh_interval: 10
3636
3737
### Filling, line width, color
3838
39+
![](example1.png)
40+
3941
```yaml
4042
type: custom:plotly-graph
4143
entities:
42-
- entity: sensor.monthly_internet_energy
43-
# see examples: https://plotly.com/javascript/line-and-scatter/
44-
# see full API: https://plotly.com/javascript/reference/scatter/#scatter
44+
- entity: sensor.office_plug_wattage
45+
# see examples: https://plotly.com/javascript/line-and-scatter/
46+
# see full API: https://plotly.com/javascript/reference/scatter/#scatter
47+
- entity: sensor.freezer_plug_power
4548
fill: tozeroy
4649
line:
4750
color: red
4851
dash: dot
49-
width: 5
52+
width: 1
5053

51-
- entity: sensor.monthly_office_energy
52-
- entity: sensor.monthly_waschtrockner_energy
5354
layout:
54-
plot_bgcolor: pink
55+
plot_bgcolor: lightgray
5556
config:
56-
scrollZoom: true
57+
scrollZoom: false
5758

58-
hours_to_show: 24
59+
hours_to_show: 1
5960
refresh_interval: 10 # in seconds
6061
```
6162
6263
### Range Selector buttons
6364
65+
![](rangeselector.apng)
66+
6467
```yaml
6568
type: custom:plotly-graph
6669
entities:
@@ -70,6 +73,8 @@ hours_to_show: 12
7073
layout:
7174
xaxis:
7275
rangeselector:
76+
# see examples: https://plotly.com/javascript/range-slider/
77+
# see API: https://plotly.com/javascript/reference/layout/xaxis/#layout-xaxis-rangeselector
7378
"y": 1.2
7479
buttons:
7580
- count: 1
@@ -84,8 +89,6 @@ layout:
8489
step: day
8590
```
8691
87-
![](rangeselector.apng)
88-
8992
## Features
9093
9194
- Anything you can do with scatter and barcharts in plotly

0 commit comments

Comments
 (0)