Zitat von Robert
Beitrag anzeigen

(Ja jetzt mach ichs mir mal einfach)
Gruss
/** * A line plot with more than one y-axis. * @param unique id for this widget * @param series of item/s. More item/s in array form: [ item1 , item2 ] * @param the mode: 'avg', 'sum', 'min', 'max' * @param the minimum time (x-axis): '1h', '2h'... (duration-format) * @param the maximum time (x-axis): '', '1h', '2h'... (duration-format, default: now) * @param the minimum y-axis: Array format, left/right axis [10 0] would be 10 on left 0 on right axis * @param the maximum y-axis: Array format, left/right axis [10 0] would be 10 on left 0 on right axis * @param the step between two time-points (optional, only for 'offline'-driver) * @param label/s for each series as list with one Entry per GAD * @param color/s for each series e. g. '#f00' for red (optional, default: sutiable for design) as list with one Entry per GAD * @param type/s for each series: 'line', 'stair', 'spline', 'area', 'areaspline', 'column' (optional, default 'line') * @param title/s for the x-axis and y-axis * @param assignment of Axes: [1, 2, 1, 1, 1] would assign all GADs to the left axis and the others to the right axis * TODO: @param minimum time while zooming in sec (optional, duration-format) * * @see misc/fundamentals#Array-Form * @see misc/fundamentals#Duration-Format */ {% macro multi_period(id, gad, mode, tmin, tmax, ymin, ymax, step, label, color, exposure, axes, axesassign) %} <div id="{{ uid(page, id) }}" data-widget="plot.multi_period" data-item="{{ implode(gad, [mode|default('avg'), tmin|default('1h'), tmax|default('0')]) }}" {% if ymin is not empty %} data-ymin="{{ implode(ymin) }}" {% endif %} {% if ymax is not empty %} data-ymax="{{ implode(ymax) }}" {% endif %} data-step="{{ step|default(20) }}" data-label="{{ implode(label) }}" data-color="{{ implode(color) }}" data-exposure="{{ implode(exposure) }}" data-axis="{{ implode(axes) }}" data-axesassign="{{ implode(axesassign) }}" class="plot"></div> {% endmacro %}
/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ {% extends "widget_plot.html" %} {% block example %} <h5>Example</h5> <div class="twig"> <code class="prettyprint"> {{ plot.multi_period('p1', ['bath_plot1', 'bath_plot2', 'bath_plot3'], 'avg', '1h', 0, 0, 100, '', '', ['#aa0', '#a00', '#00a'], ['area', 'column', 'line'], [1, 1, 2]) }}<br /><br /> </code> </div> <div class="html"> <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>p1: a simple multi_plot</h3> {{ plot.multi_period('p1', ['bath_plot1', 'bath_plot2', 'bath_plot3'], 'avg', '1h', 0, 0, 100, '', '', ['#aa0', '#a00', '#00a'], ['area', 'column', 'line'], [1, 1, 2]) }} </div> </div> </div> </div> {% endblock %}
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.
Kommentar