Ankündigung

Einklappen
Keine Ankündigung bisher.

widget: multi y plot

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #31
    Zitat von Robert Beitrag anzeigen
    Doku: ?
    - GAD ist Liste von Items
    - Mode, tmin, tmax: bekannt
    - ymin: Liste mit ymin pro Achse, also [-10 0] für linke Achse ab -10, rechte ab 0
    -ymax: analog ymin
    - step: bekannt
    - label: wie zuvor, aber als Liste mit je einen EIntrag pro GAD
    - color, exposure: analog label
    - axes: wie zuvor, jedoch ein eintrag mehr für zweite Achse
    - axesassign: Liste mit Zuweisungen der GADs zu den Axes, also [1, 2, 2] weiß das erste GAD der linken Achse zu, die beiden weiteren GADs der rechten Achse.
    Ja, sonst schreit doch auch immer alles nach Doku. . Bitte im über das Macro ne "saubere" docu und eine html-Seite für das Docu Projekt. (all in englisch please)

    (Ja jetzt mach ichs mir mal einfach)

    Gruss
    Join smartVISU on facebook. Web: smartvisu.de.
    Dir gefällt smartVISU? Bitte spenden für die Weiterentwicklung.

    Kommentar


      #32
      Hallo,

      hier mit Dokumentation im Macro:

      Macro
      Code:
      /**
      * 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 %}
      Fühlt sich jemand berufen und in der Lage, den noch zoomable zu machen?

      Gruß,
      Hendrik

      Kommentar


        #33
        Und hier die Doku:
        Code:
        /**
        * -----------------------------------------------------------------------------
        * @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">
        			&#123;&#123; plot.multi_period('p1', ['bath_plot1', 'bath_plot2', 'bath_plot3'], 'avg', '1h', 0, 0, 100, '', '', ['#aa0', '#a00', '#00a'], ['area', 'column', 'line'], [1, 1, 2]) &#125;&#125;<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 %}

        Kommentar


          #34
          Hallo,

          zwei Gedanken hierzu noch:
          -Der Plot ist ja jetzt noch nicht zoomable -das gilt auch für einige andere Plots. Sollten wir nicht alle zoomable machen?
          -Wäre es nicht sinnvoll plot.period durch plot.multi_period zu ersetzen?

          Gruß,
          Hendrik

          Kommentar


            #35
            hallo,

            hoffe es passt hier dazu, vielleicht noch ein Vorschlag zum Zoomen, vielleicht ist es möglich beim Zoomen Daten nachzufordern damit der Plot im gezoomten Bereich mehr werte hat?

            also 24h plot -> Zoomen auf 1h = wenige Werte, wenn jetzt hier nachgefordert würde damit man in der 1h wieder auf die gleiche Werteanzahl kommt wie vorher in der 24h Ansicht würde mir das sehr gefallen ;-)

            Christian

            Kommentar


              #36
              Zitat von henfri Beitrag anzeigen
              HSollten wir nicht alle zoomable machen?
              Nein nicht zwingend.

              Zitat von henfri Beitrag anzeigen
              -Wäre es nicht sinnvoll plot.period durch plot.multi_period zu ersetzen?
              Würde ich als neuen Plot sehen. Lieber ein paar mehr Typen...

              Zitat von Ferengi Beitrag anzeigen
              vielleicht ist es möglich beim Zoomen Daten nachzufordern damit der Plot im gezoomten Bereich mehr werte hat?
              Möglich wäre da schon. .

              Ich warte mal, bis die Spendenbereitschaft mal etwas steigt

              Gruss
              Join smartVISU on facebook. Web: smartvisu.de.
              Dir gefällt smartVISU? Bitte spenden für die Weiterentwicklung.

              Kommentar


                #37
                Zitat von Apollo Beitrag anzeigen
                Nein nicht zwingend.
                Und: Was ist mit diesem?!

                Fehlt sonst noch was, oder kann's so ins Develop?

                Gruß,
                Hendrik

                Kommentar


                  #38
                  Ja passt soweit, wobei mir ein name "doubleaxis" oder "multiaxis" besser gefallen würde.

                  Gruss
                  Join smartVISU on facebook. Web: smartvisu.de.
                  Dir gefällt smartVISU? Bitte spenden für die Weiterentwicklung.

                  Kommentar


                    #39
                    Super,

                    dann freue ich mich über meinen ersten -wenn auch sehr bescheidenen- Beitrag :-)

                    Soll ich das einchecken, oder machst du das? (--> Ich würde letzteres bevorzugen, kann mich aber auch in git&Co einarbeiten)

                    Gruß,
                    Hendrik

                    Kommentar


                      #40
                      Zitat von Apollo Beitrag anzeigen
                      Möglich wäre da schon. .
                      Ich warte mal, bis die Spendenbereitschaft mal etwas steigt
                      ich fühl mich jetzt mal nicht angesprochen da ich das gestern schon erledigt habe ;-)

                      Kommentar


                        #41
                        Und? War doch gar nicht so schwer oder?

                        Pack mal alles zusammen in ein Zip und sende es mir.

                        Gruss
                        Join smartVISU on facebook. Web: smartvisu.de.
                        Dir gefällt smartVISU? Bitte spenden für die Weiterentwicklung.

                        Kommentar


                          #42
                          Zitat von Apollo Beitrag anzeigen
                          Und? War doch gar nicht so schwer oder?
                          Hier fehlt mindestens! der Smilie-Tag.

                          Kommentar


                            #43
                            Jetzt:
                            Join smartVISU on facebook. Web: smartvisu.de.
                            Dir gefällt smartVISU? Bitte spenden für die Weiterentwicklung.

                            Kommentar


                              #44
                              Hallo,

                              anbei die Zip.

                              Die Docu funktioniert nicht. Kannst du da bitte einmal rein schauen?

                              Gruß,
                              Hendrik
                              Angehängte Dateien

                              Kommentar


                                #45
                                Hm, irgendwas ist da noch faul, fürchte ich.
                                Es werden keine Diagramme geplottet.

                                Da muss nochmal jemand drüber schauen.

                                Gruß,
                                Hendrik

                                Kommentar

                                Lädt...
                                X