Plot-Widgets

plot.comfortchart plot.gauge plot.heatingcurve plot.period plot.pie plot.rtr plot.sparkline plot.temprose plot.timeshift plot.xyplot


plot.timeshift

scrolls plots in the time-range by cancelling actual series and subscribing series with changed start/end

Parameters
{{ plot.timeshift(id, plot, step, type, label) }}
id
ID of the widget (optional)
plot
ID of the plot to scroll (plot must have an ID in this case)
step
step to scroll with each click in duration format
type
icon type / size. valid types: 'micro','mini','midi','icon' and 'head' if widget is in the headline of a box (optional, default = 'mini')
label
text to show between the buttons (optional, default = '')

The widget scrolls a plot in the time-range by cancelling the actual series and subscribing series for the same item(s) with changed start and end time. The "step" parameter defines the time-shift applied for every click on the widgets buttons. Use the duration format for "step". The plot to be scrolled must have an ID which must be named in the "plot" parameter.

The widget is available for all backends where the startseries / stopseries methods can be called with a single plot widget as parameter. Actually, these are smarthomeNG and offline drivers.

Examples
{{ plot.period('plot1', 'bath_plot_value', 'avg', '3h') }}
{{ plot.timeshift('', 'plot1', '3h','', ' - 3h + ') }}


<div class="block"> <div class="set-1" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
<div data-role="collapsible" data-collapsed="false">
<h3>widget in the headline {{ plot.timeshift('', 'plot2', '1h', 'head', '1h') }}</h3>
{{ plot.period('plot2', ['bath_plot1', 'bath_plot2', 'bath_plot3'], 'avg', '1h', 'now', 0, 100, '', '', ['#aa0', '#a00', '#00a'], ['area', 'column', 'line']) }}
</div>
</div>
</div>

widget placed somewhere on the page

- 3h +

widget in the headline 1h


Author: Wolfram v. Hülsen