Split 7days template into includes. Some optimisations.
This commit is contained in:
parent
a9fbfd1384
commit
c7209c7641
@ -1,57 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<graph xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<size>600, 800</size>
|
||||
<fileformat>pngcairo font "arial,8"</fileformat>
|
||||
<xi:include href="includes/format_png.xml" parse="xml" />
|
||||
<duration>weeks=1</duration>
|
||||
<xformat>%a %d</xformat>
|
||||
<dateformat></dateformat>
|
||||
<plot>
|
||||
<yrange>-20, 40</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>1</colour>
|
||||
<title>Temperatur (℃)</title>
|
||||
<ycalc>data['temp_out']</ycalc>
|
||||
</subplot>
|
||||
<subplot>
|
||||
<colour>3</colour>
|
||||
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc>
|
||||
<title>Taupunkt (℃)</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
<plot>
|
||||
<title>Windgeschwindigkeit (km/h)</title>
|
||||
<yrange>0, 30</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>4</colour>
|
||||
<ycalc>data['wind_gust'] * 3.6</ycalc>
|
||||
<title>Boe</title>
|
||||
</subplot>
|
||||
<subplot>
|
||||
<colour>3</colour>
|
||||
<ycalc>data['wind_ave'] * 3.6</ycalc>
|
||||
<title>durchschn.</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
<plot>
|
||||
<yrange>0, 5</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>5</colour>
|
||||
<style>box</style>
|
||||
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc>
|
||||
<ycalc>data['rain']</ycalc>
|
||||
<title>Stündl. Regenfall (mm)</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
<plot>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>2</colour>
|
||||
<ycalc>data['rel_pressure']</ycalc>
|
||||
<title>Luftdruck (hPa)</title>
|
||||
</subplot>
|
||||
<yrange>960, 1050</yrange>
|
||||
</plot>
|
||||
<xi:include href="includes/hourly_temp_dew_line.xml" parse="xml" />
|
||||
<xi:include href="includes/hourly_wind_gust_line.xml" parse="xml" />
|
||||
<xi:include href="includes/hourly_rain_bar.xml" parse="xml" />
|
||||
<xi:include href="includes/hourly_press_line.xml" parse="xml" />
|
||||
</graph>
|
||||
|
@ -1,57 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<graph xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<size>600, 800</size>
|
||||
<fileformat>svg font "arial,10"</fileformat>
|
||||
<xi:include href="includes/format_svg.xml" parse="xml" />
|
||||
<duration>weeks=1</duration>
|
||||
<xformat>%a %d</xformat>
|
||||
<dateformat></dateformat>
|
||||
<plot>
|
||||
<yrange>-20, 40</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>1</colour>
|
||||
<title>Temperatur (℃)</title>
|
||||
<ycalc>data['temp_out']</ycalc>
|
||||
</subplot>
|
||||
<subplot>
|
||||
<colour>3</colour>
|
||||
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc>
|
||||
<title>Taupunkt (℃)</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
<plot>
|
||||
<title>Windgeschwindigkeit (km/h)</title>
|
||||
<yrange>0, 30</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>4</colour>
|
||||
<ycalc>data['wind_gust'] * 3.6</ycalc>
|
||||
<title>Boe</title>
|
||||
</subplot>
|
||||
<subplot>
|
||||
<colour>3</colour>
|
||||
<ycalc>data['wind_ave'] * 3.6</ycalc>
|
||||
<title>durchschn.</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
<plot>
|
||||
<yrange>0, 5</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>5</colour>
|
||||
<style>box</style>
|
||||
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc>
|
||||
<ycalc>data['rain']</ycalc>
|
||||
<title>Stündl. Regenfall (mm)</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
<plot>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>2</colour>
|
||||
<ycalc>data['rel_pressure']</ycalc>
|
||||
<title>Luftdruck (hPa)</title>
|
||||
</subplot>
|
||||
<yrange>960, 1050</yrange>
|
||||
</plot>
|
||||
<xi:include href="includes/hourly_temp_dew_line.xml" parse="xml" />
|
||||
<xi:include href="includes/hourly_wind_gust_line.xml" parse="xml" />
|
||||
<xi:include href="includes/hourly_rain_bar.xml" parse="xml" />
|
||||
<xi:include href="includes/hourly_press_line.xml" parse="xml" />
|
||||
</graph>
|
||||
|
@ -7,6 +7,6 @@
|
||||
<style>box</style>
|
||||
<xcalc>data['start'] + timedelta(hours=12)</xcalc>
|
||||
<ycalc>data['rain']</ycalc>
|
||||
<title>Tägl. Regenfall (mm)</title>
|
||||
<title>Tägl. Regenfall (㎜)</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<subplot>
|
||||
<colour>2</colour>
|
||||
<ycalc>data['rel_pressure']</ycalc>
|
||||
<title>Luftdruck (hPa)</title>
|
||||
<title>Luftdruck (㍱)</title>
|
||||
</subplot>
|
||||
<yrange>960, 1050</yrange>
|
||||
</plot>
|
||||
|
@ -7,6 +7,6 @@
|
||||
<style>box</style>
|
||||
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc>
|
||||
<ycalc>data['rain']</ycalc>
|
||||
<title>Tägl. Regenfall (mm)</title>
|
||||
<title>Regenfall (㎜)</title>
|
||||
</subplot>
|
||||
</plot>
|
||||
|
15
_graph_templates/includes/hourly_temp_dew_line.xml
Normal file
15
_graph_templates/includes/hourly_temp_dew_line.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<plot>
|
||||
<yrange>-20, 40</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
<colour>1</colour>
|
||||
<title>Temperatur (℃)</title>
|
||||
<ycalc>data['temp_out']</ycalc>
|
||||
</subplot>
|
||||
<subplot>
|
||||
<colour>3</colour>
|
||||
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc>
|
||||
<title>Taupunkt (℃)</title>
|
||||
</subplot>
|
||||
</plot>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<plot>
|
||||
<title>Windgeschwindigkeit (km/h)</title>
|
||||
<title>Windgeschwindigkeit (㎞/h)</title>
|
||||
<yrange>0, 30</yrange>
|
||||
<source>hourly</source>
|
||||
<subplot>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<plot>
|
||||
<title>Windgeschwindigkeit (km/h)</title>
|
||||
<title>Windgeschwindigkeit (㎞/h)</title>
|
||||
<yrange>0, 30</yrange>
|
||||
<source>raw</source>
|
||||
<subplot>
|
||||
|
Reference in New Issue
Block a user