Class ::rrd::DataElement (public)

 ::nx::Class ::rrd::DataElement[i]

Defined in packages/rrd-tool/tcl/rrd-procs.tcl

Testcases:
No testcase defined.
Source code:
    :property name
    :property datasource:required
    :property {ds-name 42}
    :property {scale 1}
    
    :method init {} {
      next
      if {![info exists :name]} {
        set :name [${:datasource} cget -name]
      }
    }
    
    :public method render {} {
      set rrdFile [${:datasource} cget -rrdFile]
      regsub -all {[-]} ${:name} _ :name
      lappend defs  DEF:${:name}avg=${rrdFile}:${:ds-name}:AVERAGE  DEF:${:name}cur=${rrdFile}:${:ds-name}:LAST  DEF:${:name}min=${rrdFile}:${:ds-name}:MIN  DEF:${:name}max=${rrdFile}:${:ds-name}:MAX  CDEF:${:name}avgscaled=${:name}avg,${:scale},*  CDEF:${:name}curscaled=${:name}cur,${:scale},*  CDEF:${:name}minscaled=${:name}min,${:scale},*  CDEF:${:name}maxscaled=${:name}max,${:scale},*

      return $defs
    }

    :method gprintLegend {} {
      return [list  GPRINT:${:name}curscaled:LAST:%6.2lf%s\t  GPRINT:${:name}minscaled:MIN:%6.2lf%s\t  GPRINT:${:name}avgscaled:AVERAGE:%6.2lf%s\t  GPRINT:${:name}maxscaled:MAX:%6.2lf%s\\l ]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: