Skip to content

Commit 753b8e1

Browse files
author
David Buezas
committed
added range selector example
1 parent 99d1688 commit 753b8e1

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

rangeselector.apng

94.8 KB
Binary file not shown.

readme.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
![](demo2.gif)
55

66
## [Post in HomeAssistant community forum](https://community.home-assistant.io/t/plotly-interactive-graph-card/347746)
7+
78
You may find some extra info there in this link
89

910
## Install through HACS
@@ -16,7 +17,7 @@ You may find some extra info there in this link
1617

1718
## Card Config
1819

19-
_**New**_ Visual Config editor available for Basic Configs (*)
20+
_**New**_ Visual Config editor available for Basic Configs (\*)
2021

2122
```yaml
2223
type: custom:plotly-graph
@@ -29,9 +30,12 @@ hours_to_show: 24
2930
refresh_interval: 10
3031
```
3132
32-
(*) I'm reusing the editor of the standard History Card. Cheap, yes, but it works fine. usually. or use yaml
33+
(\*) I'm reusing the editor of the standard History Card. Cheap, yes, but it works fine. Use yaml for advanced functionality
34+
3335
## Advanced
3436
37+
### Filling, line width, color
38+
3539
```yaml
3640
type: custom:plotly-graph
3741
entities:
@@ -55,6 +59,33 @@ hours_to_show: 24
5559
refresh_interval: 10 # in seconds
5660
```
5761
62+
### Range Selector buttons
63+
64+
```yaml
65+
type: custom:plotly-graph
66+
entities:
67+
- entity: sensor.temperature
68+
refresh_interval: 10
69+
hours_to_show: 12
70+
layout:
71+
xaxis:
72+
rangeselector:
73+
"y": 1.2
74+
buttons:
75+
- count: 1
76+
step: minute
77+
- count: 1
78+
step: hour
79+
- count: 12
80+
step: hour
81+
- count: 1
82+
step: day
83+
- count: 7
84+
step: day
85+
```
86+
87+
![](rangeselector.apng)
88+
5889
## Features
5990
6091
- Anything you can do with scatter and barcharts in plotly

0 commit comments

Comments
 (0)