Skip to content

Commit c958dfa

Browse files
authored
Fix readme formatting (#527)
1 parent eafceb2 commit c958dfa

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

readme.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,24 +1072,31 @@ Below is an example YAML configuration that is split into several corresponding
10721072
<table>
10731073
<tr>
10741074
<th>YAML configuration</th>
1075-
<th>Preset configurations</th>
10761075
</tr>
1077-
<tr style="vertical-align:top">
1076+
<tr>
10781077
<td>
10791078

10801079
```yaml
10811080
hours_to_show: current_day
10821081
time_offset: -24h
10831082
defaults:
10841083
entity:
1085-
hovertemplate: "$fn ({ get }) => `%{y:,.1f} ${get('.unit_of_measurement')}<extra>${get('.name')}</extra>`"
1084+
hovertemplate: |
1085+
$fn ({ get }) => (
1086+
`%{y:,.1f} ${get('.unit_of_measurement')}<extra>${get('.name')}</extra>`
1087+
)
10861088
xaxes:
10871089
showspikes: true
10881090
spikemode: across
10891091
spikethickness: -2
10901092
```
10911093
10921094
</td>
1095+
</tr>
1096+
<tr>
1097+
<th>Preset configurations</th>
1098+
</tr>
1099+
<tr>
10931100
<td>
10941101
10951102
```js
@@ -1101,7 +1108,9 @@ window.PlotlyGraphCardPresets = {
11011108
simpleHover: { // Start of preset with name 'simpleHover'
11021109
defaults: {
11031110
entity: {
1104-
hovertemplate: ({get}) => `%{y:,.1f} ${get(".unit_of_measurement")}<extra>${get(".name")}</extra>`,
1111+
hovertemplate: ({get}) => (
1112+
`%{y:,.1f} ${get('.unit_of_measurement')}<extra>${get('.name')}</extra>`
1113+
),
11051114
},
11061115
},
11071116
},

0 commit comments

Comments
 (0)