Skip to content

Commit 0582af3

Browse files
committed
removed no_ha_theme and no_default_layout in favour of ha_theme and raw_plotly_config
1 parent a1afd20 commit 0582af3

File tree

6 files changed

+76
-875
lines changed

6 files changed

+76
-875
lines changed

readme.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ entities:
732732
type: histogram
733733
title: Temperature Histogram last 10 days
734734
hours_to_show: 240
735-
no_default_layout: true
735+
raw_plotly_config: true
736736
layout:
737737
margin:
738738
t: 0
@@ -789,24 +789,30 @@ defaults:
789789
To define layout aspects, like margins, title, axes names, ...
790790
Anything from https://plotly.com/javascript/reference/layout/.
791791

792-
### disable default layout:
792+
### Home Assistant theming:
793793

794-
Use this if you want to use plotly default layout instead. Very useful for heavy customization while following pure plotly examples.
794+
Disables Home Assistant theme colors
795795

796796
```yaml
797797
type: custom:plotly-graph
798798
entities:
799799
- entity: sensor.temperature_in_celsius
800-
no_default_layout: true
800+
ha_theme: false #defaults to true unless raw_plotly_config is true
801801
```
802802

803-
### disable Home Assistant themes:
803+
### Raw plotly config:
804+
805+
Disables all in-built defaults for layout and entitites. Useful when using histograms, 3d plots, etc.
806+
The `x` and `y` properties of the traces won't be automatically filled with entity data, you need to use $fn for that.
807+
It will also change the default of `ha_theme` to false (you can set it to true manually)
804808

805809
```yaml
806810
type: custom:plotly-graph
807811
entities:
808812
- entity: sensor.temperature_in_celsius
809-
no_theme: true
813+
x: $fn ({xs}) => xs
814+
y: $fn ({ys}) => ys
815+
raw_plotly_config: true # defaults to false
810816
```
811817

812818
## config:

0 commit comments

Comments
 (0)