fixed radar chart tooltip text.

This commit is contained in:
Martynas Mickevicius
2010-07-23 13:54:19 +03:00
parent 25a59f23d5
commit afe5f63c4b
2 changed files with 17 additions and 4 deletions

View File

@@ -2213,12 +2213,17 @@
$vecLength = sqrt($vecX * $vecX + $vecY * $vecY);
$vecX = $vecX / $vecLength;
$vecY = $vecY / $vecLength;
$tooltipValue = '';
foreach ($DataDescription['Description'] as $key => $value) {
$tooltipValue .= $value.':'.sprintf("%.2f", $Data[$i][$key]).' ';
}
$offset = 10;
$this->addPointToImageMap($X+$vecX*-$offset,$Y+$vecY*-$offset,$Label,'Value','Radar');
$this->addPointToImageMap($X+$vecX*+$offset,$Y+$vecY*+$offset,$Label,'Value','Radar');
$this->addPointToImageMap($XCenter+$vecX*+$offset,$YCenter+$vecY*+$offset,$Label,'Value','Radar');
$this->addPointToImageMap($XCenter+$vecX*-$offset,$YCenter+$vecY*-$offset,$Label,'Value','Radar');
$this->addPointToImageMap($X+$vecX*-$offset,$Y+$vecY*-$offset,$Label,$tooltipValue,'Radar');
$this->addPointToImageMap($X+$vecX*+$offset,$Y+$vecY*+$offset,$Label,$tooltipValue,'Radar');
$this->addPointToImageMap($XCenter+$vecX*+$offset,$YCenter+$vecY*+$offset,$Label,$tooltipValue,'Radar');
$this->addPointToImageMap($XCenter+$vecX*-$offset,$YCenter+$vecY*-$offset,$Label,$tooltipValue,'Radar');
}
}
}

View File

@@ -151,6 +151,14 @@ $url_params['reload'] = 1;
</td>
</tr>
<?php } ?>
<?php if ($chartSettings['type'] == 'radar') { ?>
<tr><td colspan="2">
<p>
When drawing a radar chart all values are normalized to a range [0..10].
</p>
</td></tr>
<?php } ?>
</table>