updated timedMovingAverage diagram and examples

pull/918/head
Scott Anderson 2020-04-07 15:07:08 -06:00
parent df36bfd92e
commit 15ec3b762b
2 changed files with 54 additions and 45 deletions

View File

@ -76,7 +76,7 @@ If `n = 3`:
|:----- | ------:|
| 2020-01-01T00:03:00Z | 1.33 |
| 2020-01-01T00:04:00Z | 1.30 |
| 2020-01-01T00:05:00Z | 1.06 |
| 2020-01-01T00:05:00Z | 1.36 |
| 2020-01-01T00:06:00Z | 1.43 |
{{% /flex-content %}}
{{< /flex >}}
@ -117,7 +117,9 @@ If `every = 30m` and `period = 1h`:
| _time | _value |
|:----- | ------:|
| 2020-01-01T00:04:00Z | 1.23 |
| 2020-01-01T00:06:00Z | 1.53 |
| 2020-01-01T00:02:00Z | 1.000 |
| 2020-01-01T00:04:00Z | 1.333 |
| 2020-01-01T00:06:00Z | 1.325 |
| 2020-01-01T00:06:00Z | 1.150 |
{{% /flex-content %}}
{{< /flex >}}

View File

@ -1,56 +1,63 @@
<svg version="1.1" id="timed-moving-average" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 340 154" style="enable-background:new 0 0 340 154;" xml:space="preserve">
viewBox="0 0 340 183" style="enable-background:new 0 0 340 183;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#D7D4DC;stroke-miterlimit:10;}
.st0{fill:none;stroke-miterlimit:10;}
.st1{}
.st2{}
.st3{font-size:14px;}
.st4{fill:#DC4E58;fill-opacity:0.15;stroke:#DC4E58;stroke-miterlimit:10;}
.st4{fill:#D75189;fill-opacity:0.15;stroke:#D75189;stroke-miterlimit:10;}
.st5{fill:none;stroke:#DC4E58;stroke-miterlimit:10;}
.st6{fill:#D553A2;fill-opacity:0.15;stroke:#D553A2;stroke-miterlimit:10;}
.st6{fill:#D355BA;fill-opacity:0.15;stroke:#D355BA;stroke-miterlimit:10;}
.st7{fill:none;stroke:#D553A2;stroke-miterlimit:10;}
.st8{fill:#CE58EB;fill-opacity:0.15;stroke:#CE58EB;stroke-miterlimit:10;}
.st9{fill:none;stroke:#CE58EB;stroke-miterlimit:10;}
.st10{fill:#677EF5;fill-opacity:0.15;stroke:#677EF5;stroke-miterlimit:10;}
.st10{fill:#8971F2;fill-opacity:0.15;stroke:#8971F2;stroke-miterlimit:10;}
.st11{fill:none;stroke:#677EF5;stroke-miterlimit:10;}
.st12{fill:#00A3FF;fill-opacity:0.15;stroke:#00A3FF;stroke-miterlimit:10;}
.st13{fill:#00A3FF;}
.st14{fill:#677EF5;}
.st15{fill:#CE58EB;}
.st16{fill:#D553A2;}
.st17{fill:#DC4E58;}
.st18{fill:none;stroke:#00A3FF;stroke-miterlimit:10;}
.st12{fill:#458AF8;fill-opacity:0.15;stroke:#458AF8;stroke-miterlimit:10;}
.st13{fill:#00A3FF;fill-opacity:0.15;stroke:#00A3FF;stroke-miterlimit:10;}
.st14{fill:#458AF8;}
.st15{fill:#8971F2;}
.st16{fill:#CE58EB;}
.st17{fill:#D355BA;}
.st18{fill:#D75189;}
.st19{fill:#DC4E58;fill-opacity:0.15;stroke:#DC4E58;stroke-miterlimit:10;}
.st20{fill:#DC4E58;}
.st21{fill:none;stroke:#00A3FF;stroke-miterlimit:10;}
</style>
<line class="st0" x1="19.24" y1="121.35" x2="319.32" y2="121.35"/>
<line class="st0" x1="19.5" y1="153.28" x2="319.58" y2="153.28"/>
<g>
<line class="st0" x1="19.24" y1="125.35" x2="19.24" y2="117.35"/>
<line class="st0" x1="69.26" y1="125.35" x2="69.26" y2="117.35"/>
<line class="st0" x1="119.27" y1="125.35" x2="119.27" y2="117.35"/>
<line class="st0" x1="169.28" y1="125.35" x2="169.28" y2="117.35"/>
<line class="st0" x1="219.3" y1="125.35" x2="219.3" y2="117.35"/>
<line class="st0" x1="269.31" y1="125.35" x2="269.31" y2="117.35"/>
<line class="st0" x1="319.32" y1="125.35" x2="319.32" y2="117.35"/>
<line class="st0" x1="19.5" y1="157.28" x2="19.5" y2="149.28"/>
<line class="st0" x1="69.51" y1="157.28" x2="69.51" y2="149.28"/>
<line class="st0" x1="119.52" y1="157.28" x2="119.52" y2="149.28"/>
<line class="st0" x1="169.54" y1="157.28" x2="169.54" y2="149.28"/>
<line class="st0" x1="219.55" y1="157.28" x2="219.55" y2="149.28"/>
<line class="st0" x1="269.56" y1="157.28" x2="269.56" y2="149.28"/>
<line class="st0" x1="319.58" y1="157.28" x2="319.58" y2="149.28"/>
</g>
<text transform="matrix(1 0 0 1 3.2131 145.1354)" class="st1 st2 st3">0:00</text>
<text transform="matrix(1 0 0 1 53.5403 145.1354)" class="st1 st2 st3">0:30</text>
<text transform="matrix(1 0 0 1 104.8401 145.1356)" class="st1 st2 st3">1:00</text>
<text transform="matrix(1 0 0 1 155.1682 145.1354)" class="st1 st2 st3">1:30</text>
<text transform="matrix(1 0 0 1 204.011 145.1357)" class="st1 st2 st3">2:00</text>
<text transform="matrix(1 0 0 1 254.3386 145.1351)" class="st1 st2 st3">2:30</text>
<text transform="matrix(1 0 0 1 304.1965 145.1356)" class="st1 st2 st3">3:00</text>
<polyline class="st4" points="19.24,50.53 19.24,40.36 119.27,40.36 119.27,50.53 "/>
<line class="st5" x1="119.27" y1="40.36" x2="119.27" y2="27.35"/>
<polyline class="st6" points="69.26,66.08 69.26,55.91 169.28,55.91 169.28,66.08 "/>
<line class="st7" x1="169.28" y1="55.91" x2="169.28" y2="27.35"/>
<polyline class="st8" points="119.27,81.64 119.27,71.47 219.3,71.47 219.3,81.64 "/>
<line class="st9" x1="219.3" y1="71.47" x2="219.3" y2="27.35"/>
<polyline class="st10" points="169.28,97.19 169.28,87.02 269.31,87.02 269.31,97.19 "/>
<line class="st11" x1="269.31" y1="87.02" x2="269.31" y2="29.35"/>
<polyline class="st12" points="219.3,112.75 219.3,102.58 319.32,102.58 319.32,112.75 "/>
<text transform="matrix(1 0 0 1 304.1967 16.8165)" class="st13 st2 st3">3:00</text>
<text transform="matrix(1 0 0 1 254.3382 16.8165)" class="st14 st2 st3">2:30</text>
<text transform="matrix(1 0 0 1 204.0109 16.8164)" class="st15 st2 st3">2:00</text>
<text transform="matrix(1 0 0 1 155.1676 16.8166)" class="st16 st2 st3">1:30</text>
<text transform="matrix(1 0 0 1 104.84 16.8168)" class="st17 st2 st3">1:00</text>
<line class="st18" x1="319.32" y1="102.58" x2="319.32" y2="32.03"/>
<text transform="matrix(1 0 0 1 3.4638 177.0608)" class="st1 st2 st3">0:00</text>
<text transform="matrix(1 0 0 1 53.791 177.0608)" class="st1 st2 st3">0:30</text>
<text transform="matrix(1 0 0 1 105.0908 177.061)" class="st1 st2 st3">1:00</text>
<text transform="matrix(1 0 0 1 155.4189 177.0608)" class="st1 st2 st3">1:30</text>
<text transform="matrix(1 0 0 1 204.2617 177.0611)" class="st1 st2 st3">2:00</text>
<text transform="matrix(1 0 0 1 254.5893 177.0605)" class="st1 st2 st3">2:30</text>
<text transform="matrix(1 0 0 1 304.4472 177.061)" class="st1 st2 st3">3:00</text>
<polyline class="st4" points="19.5,65.28 19.5,55.11 119.52,55.11 119.52,65.28 "/>
<line class="st5" x1="119.52" y1="55.09" x2="119.52" y2="26.45"/>
<polyline class="st6" points="69.51,80.86 69.51,70.69 169.54,70.69 169.54,80.86 "/>
<line class="st7" x1="169.54" y1="70.64" x2="169.54" y2="26.45"/>
<polyline class="st8" points="119.52,96.44 119.52,86.27 219.55,86.27 219.55,96.44 "/>
<line class="st9" x1="219.55" y1="86.2" x2="219.55" y2="26.45"/>
<polyline class="st10" points="169.54,112.02 169.54,101.85 269.56,101.85 269.56,112.02 "/>
<line class="st11" x1="269.56" y1="101.75" x2="269.56" y2="26.45"/>
<polyline class="st12" points="219.55,127.6 219.55,117.44 319.58,117.44 319.58,127.6 "/>
<polyline class="st13" points="269.56,143.18 269.56,133.02 319.58,133.02 319.58,143.18 "/>
<text transform="matrix(1 0 0 1 304.4474 15.9156)" class="st14 st2 st3">3:00</text>
<text transform="matrix(1 0 0 1 254.5889 15.9156)" class="st15 st2 st3">2:30</text>
<text transform="matrix(1 0 0 1 204.2616 15.9155)" class="st16 st2 st3">2:00</text>
<text transform="matrix(1 0 0 1 155.4183 15.9157)" class="st17 st2 st3">1:30</text>
<text transform="matrix(1 0 0 1 105.0907 15.9159)" class="st18 st2 st3">1:00</text>
<polyline class="st19" points="19.23,49.7 19.23,39.53 69.24,39.53 69.24,49.7 "/>
<line class="st5" x1="69.24" y1="39.53" x2="69.24" y2="26.52"/>
<text transform="matrix(1 0 0 1 53.6409 15.991)" class="st20 st2 st3">0:30</text>
<line class="st21" x1="319.58" y1="135.02" x2="319.58" y2="26.45"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB