The BarChart snippet provides a single dimension barchart based on one question_code for all surveys using a specific survey_code

Options are: $min / $max for min and max values for the chart $showButtons show buttons underneath the chart for cancel / print $showHeaders show a header for the overview (chart always has a header) $question_code single question code or array of questioncodes to get a grouped barchart $survey_code

package Gems
subpackage Snippets\Survey\Display
author Menno Dekker
copyright Copyright (c) 2014 Erasmus MC
license New BSD License
version $Id$

 Methods

afterRegistry()

afterRegistry() 

getChart()

getChart() 

Copied from parent, but insert chart instead of table after commented out part

getHtmlOutput(\Zend_View_Abstract $view) : \type

Parameters

$view

\Zend_View_Abstract

Returns

\type

doRulers()

doRulers($chart) 

Parameters

$chart

Return the percentage in the range between min and max for this chart

getPercentage(\number $value) : float

Parameters

$value

\number

Returns

float

 Properties

 

$data

$data 

Default

 

Show gridlines every 10%

$grid : boolean

Default

true
 

$loader

$loader : \Gems_Loader

Default

 

The question code to use for the chart

$question_code : string

Default

null
 

The question text to use for the chart

$question_text : string

Default

null
 

$request

$request : \Zend_Controller_Request_Abstract

Default

 

Array of rulers, defaults to each 10% a ruler

$rulers : array

Default

array()

percentage (0-100) value (between min/max) class positive/negative for green/red color

 

The survey code to select on

$survey_code : string

Default

null
 

$token

$token : \Gems_Tracker_Token

Default

 

The maximum value

$max : integer

Default

100
 

Minimum value

$min : integer

Default

0
 

Switch to put the display of the cancel and print buttons.

$showButtons : boolean

Default

true
 

Switch to put the display of the headers on or off

$showHeaders : boolean

Default

true