Commit ff812d04 authored by olau@iola.dk's avatar olau@iola.dk

Fix hover/click bug, obj might be null


git-svn-id: https://flot.googlecode.com/svn/trunk@287 1e0a6537-2640-0410-bfb7-f154510ff394
parent 147f940e
......@@ -269,12 +269,16 @@ $(function () {
function pieHover(event, pos, obj)
{
if (!obj)
return;
percent = parseFloat(obj.series.percent).toFixed(2);
$("#hover").html('<span style="font-weight: bold; color: '+obj.series.color+'">'+obj.series.label+' ('+percent+'%)</span>');
}
function pieClick(event, pos, obj)
{
if (!obj)
return;
percent = parseFloat(obj.series.percent).toFixed(2);
alert(''+obj.series.label+': '+percent+'%');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment