Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:create:functions:diagram2 [19.01.2020 16:04] leonie.junkeren:create:functions:diagram2 [19.01.2020 16:11] (current) leonie.junker
Line 3: Line 3:
 ''string **diagram2**(string //Type//, array //Data//, [array //Options//])'' ''string **diagram2**(string //Type//, array //Data//, [array //Options//])''
  
-With the function ''diagram2()'' data can be visualized which have been calculated before in the questionnaire -- e.g. from the user's data via ''[[:en:create:functions:value|value()]]' or via ''[[:en:create:functions:statistic|statistic()]]''.+With the function ''diagram2()'' data can be visualized which have been calculated before in the questionnaire -- e.g. from the user's data via ''[[:en:create:functions:value|value()]]'' or via ''[[:en:create:functions:statistic|statistic()]]''. 
  
 Currently this function can only display a polarity profile. Currently this function can only display a polarity profile.
Line 9: Line 10:
   * //Type//\\ Defines the type of chart:   * //Type//\\ Defines the type of chart:
     * '''polar''' -- polarity profile     * '''polar''' -- polarity profile
 +
   * //Data//\\ The data is specified as a two-dimensional array, i.e. an array with one array per data series (see example).   * //Data//\\ The data is specified as a two-dimensional array, i.e. an array with one array per data series (see example).
   * //Options// A number of options are available for controlling the display. Some of these only apply to certain types of chart. The options are specified as a named array (see example).   * //Options// A number of options are available for controlling the display. Some of these only apply to certain types of chart. The options are specified as a named array (see example).
Line 20: Line 22:
     * array //limitcolor// -- background colors for the different areas between the borders (only polarity profile, specified as HTML color codes, e.g. ''%%'0000FF'%%'' for blue)     * array //limitcolor// -- background colors for the different areas between the borders (only polarity profile, specified as HTML color codes, e.g. ''%%'0000FF'%%'' for blue)
     * array //rowcolor// -- character colors for the data series (specified as HTML color codes)     * array //rowcolor// -- character colors for the data series (specified as HTML color codes)
 +
 +
  
 ====== Examples ===== ====== Examples =====
  
-For examplea multidimensional array could look like this:+For example a multidimensional array could look like this:
  
 <code php> <code php>
Line 37: Line 41:
 array( array(
   'width' => 320,   'width' => 320,
-  "height=> 120,+  'height=> 120,
   'min' => 1,   'min' => 1,
   'max' => 7,   'max' => 7,
-  labels => true,+  'labels=> true,
   'limit' => array(2,4)   'limit' => array(2,4)
 ) )
 </code> </code>
  
-A diagram can be output as follows:+A diagram can be an output as follows:
  
 <code php> <code php>
Line 55: Line 59:
   array(   array(
     'width' => 320,     'width' => 320,
-    "height=> 120, +    'height=> 120, 
-    labelwidth => 100,+    'labelwidth=> 100,
     'min' => 1,     'min' => 1,
     'max' => 7,     'max' => 7,
-    labels => true,+    'labels=> true,
     'limit' => array(2,5,7),     'limit' => array(2,5,7),
     'limitcolor' => array('FFFF99', 'FFFFFF', 'FFFF99')     'limitcolor' => array('FFFF99', 'FFFFFF', 'FFFF99')
en/create/functions/diagram2.txt · Last modified: 19.01.2020 16:11 by leonie.junker
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki