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;
97 $this->containerWidth =
$width;
98 $this->containerHeight =
$height;
114 $this->labelSize =
$size;
139 $this->colorMode =
'fixed';
143 $this->colorMode =
'interpolated';
146 $this->minColor =
$min;
147 $this->maxColor =
$max;
152 $this->strokeWidth = $s;
157 $this->fontFamily = $font;
170 $animate = $this->animate ?
"true" :
"false";
172 $legend = $this->legend ?
"true" :
"false";
173 $percentages = $this->showPercentages ?
"true" :
"false";
174 $download = $this->enableDownload ?
"true" :
"false";
176 $targetLabel = jsSafe($this->targetLabel);
179 $containerWidth = is_numeric($this->containerWidth) ? $this->containerWidth .
"px" :
$this->containerWidth;
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>";
setLabelPosition($lx, $ly)
__construct($id, $width=300, $height=300, $value=0, $label='', $palette="standard")
setColorRange($min, $max=null)
setLabelSize($size, $targetLabelSize="inherit")
showTarget($target, $targetLabel)
setContainerSize($width, $height="0")
static using()
Import the datamodels, views and manifest for the specified component(s).