Skip to content

Commit

Permalink
Wrap the click stats chart in a conditional statement that ensures th…
Browse files Browse the repository at this point in the history
…e code isn't trying to create a chart object from null table data. The fix was provided by @anildash via http://groups.google.com/group/thinkupapp/msg/7fa6d1db5e55e9cb on the Thinkup list.
  • Loading branch information
jamesgallagher-ie committed Apr 4, 2012
1 parent c4ac728 commit a5548dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webapp/_lib/view/dashboard.tpl
Expand Up @@ -253,7 +253,10 @@
}
});
hot_posts_chart.draw();
{/literal}
{if $click_stats_data}
{literal}
formatter.format(click_stats_data, 1);
var click_stats_chart = new google.visualization.ChartWrapper({
containerId: 'click_stats',
Expand All @@ -278,7 +281,10 @@
}
});
click_stats_chart.draw();
{/literal}
{/if}
{literal}
formatter.format(follower_count_history_by_day_data, 1);
formatter_date.format(follower_count_history_by_day_data, 0);
Expand Down

0 comments on commit a5548dd

Please sign in to comment.