|
| __construct ($id, $width=300, $height=300, $value=0, $label='', $palette="standard") |
|
| setSize ($width, $height) |
|
| setContainerSize ($width, $height="0") |
|
| setCenter ($cx, $cy) |
|
| setRadius ($r) |
|
| setLabelSize ($size, $targetLabelSize="inherit") |
|
| setLabelPosition ($lx, $ly) |
|
| setRange ($min, $max) |
|
| setColorRange ($min, $max=null) |
|
| setStrokeWidth ($s) |
|
| setFontFamily ($font) |
|
| showTarget ($target, $targetLabel) |
|
| draw () |
|
Definition at line 41 of file dial.inc.
◆ __construct()
Dial::__construct |
( |
|
$id, |
|
|
|
$width = 300 , |
|
|
|
$height = 300 , |
|
|
|
$value = 0 , |
|
|
|
$label = '' , |
|
|
|
$palette = "standard" |
|
) |
| |
Definition at line 76 of file dial.inc.
setContainerSize($width, $height="0")
◆ draw()
Definition at line 167 of file dial.inc.
170 $animate = $this->animate ?
"true" :
"false";
172 $legend = $this->legend ?
"true" :
"false";
173 $percentages = $this->showPercentages ?
"true" :
"false";
174 $download = $this->enableDownload ?
"true" :
"false";
183 <script type=
"text/javascript">
184 window.addEvent(
'domready',
function ()
186 var {$this->
id} =
new Dial(
'{$this->id}', $this->value,
'{$this->label}',
192 radius: {$this->radius},
193 palette:
'{$this->palette}',
194 labelSize: {$this->labelSize},
195 labelx: {$this->labelX},
196 labely: {$this->labelY},
197 fontFamily:
'{$this->fontFamily}',
198 strokeWidth: {$this->strokeWidth},
201 enableDownload: {$download},
204 minColor:
'{$this->minColor}',
205 maxColor:
'{$this->maxColor}',
206 colorMode:
'{$this->colorMode}',
209 targetLabel:
'{$targetLabel}',
210 targetLabelSize:
'{$this->targetLabelSize}',
211 onDrawChart: {$this->onDrawChart},
212 onDrawChartComplete: {$this->onDrawChartComplete},
213 onDrawLegend: {$this->onDrawLegend},
214 onDrawLegendComplete: {$this->onDrawLegendComplete}
224 $dimensions =
"width: 100%; height: auto";
228 $dimensions =
"width: {$containerWidth}; height: {$containerHeight};";
232 echo
"<div id='{$this->id}'{$cssClass} style='$dimensions'></div>";
showTarget($target, $targetLabel)
◆ setCenter()
Dial::setCenter |
( |
|
$cx, |
|
|
|
$cy |
|
) |
| |
◆ setColorRange()
Dial::setColorRange |
( |
|
$min, |
|
|
|
$max = null |
|
) |
| |
Definition at line 130 of file dial.inc.
139 $this->colorMode =
'fixed';
143 $this->colorMode =
'interpolated';
146 $this->minColor =
$min;
147 $this->maxColor =
$max;
◆ setContainerSize()
Dial::setContainerSize |
( |
|
$width, |
|
|
|
$height = "0" |
|
) |
| |
◆ setFontFamily()
Dial::setFontFamily |
( |
|
$font | ) |
|
Definition at line 155 of file dial.inc.
157 $this->fontFamily = $font;
◆ setLabelPosition()
Dial::setLabelPosition |
( |
|
$lx, |
|
|
|
$ly |
|
) |
| |
◆ setLabelSize()
Dial::setLabelSize |
( |
|
$size, |
|
|
|
$targetLabelSize = "inherit" |
|
) |
| |
◆ setRadius()
◆ setRange()
Dial::setRange |
( |
|
$min, |
|
|
|
$max |
|
) |
| |
◆ setSize()
Dial::setSize |
( |
|
$width, |
|
|
|
$height |
|
) |
| |
Definition at line 86 of file dial.inc.
90 if (!$this->cx) $this->cx = $this->
width / 2;
91 if (!$this->cy) $this->cy = $this->
height / 2;
92 if (!$this->radius) $this->radius = min(
$width,
$height) * .4;
◆ setStrokeWidth()
Dial::setStrokeWidth |
( |
|
$s | ) |
|
Definition at line 150 of file dial.inc.
152 $this->strokeWidth = $s;
◆ showTarget()
Dial::showTarget |
( |
|
$target, |
|
|
|
$targetLabel |
|
) |
| |
◆ $animate
◆ $colorMode
Dial::$colorMode = 'fixed' |
◆ $containerHeight
◆ $containerWidth
◆ $cssClass
◆ $cx
◆ $cy
◆ $fontFamily
Dial::$fontFamily = 'Arial, Helvetica' |
◆ $height
◆ $label
◆ $labelSize
◆ $labelX
◆ $labelY
◆ $max
◆ $maxColor
◆ $min
◆ $minColor
◆ $onDrawChart
Dial::$onDrawChart = "null" |
◆ $onDrawChartComplete
Dial::$onDrawChartComplete = "null" |
◆ $onDrawLegend
Dial::$onDrawLegend = "null" |
◆ $onDrawLegendComplete
Dial::$onDrawLegendComplete = "null" |
◆ $palette
◆ $radius
◆ $scaleToFit
Dial::$scaleToFit = false |
◆ $shadow
◆ $showTarget
Dial::$showTarget = false |
◆ $strokeWidth
◆ $target
◆ $targetLabel
◆ $targetLabelSize
Dial::$targetLabelSize = "inherit" |
◆ $value
◆ $width
The documentation for this class was generated from the following file:
- C:/code/cms.sonjara.com/cms/components/svg_charts/dial.inc