Refactoring fixes and adding functionality back
This commit is contained in:
@@ -36,6 +36,12 @@ google.charts.load('current', {
|
||||
|
||||
// load json data
|
||||
function loadData(jsonData) {
|
||||
if (jsonData.length === 0) {
|
||||
// Show message when no data
|
||||
$('#chart_div').html('<div class="alert alert-info text-center"><h4>No Vote Data Available</h4><p>No players have received MOTM or DotD votes yet.</p><p>Votes will appear here once players start receiving votes.</p></div>');
|
||||
return;
|
||||
}
|
||||
|
||||
$.each(jsonData, function(index, row) {
|
||||
data.addRow([
|
||||
row.playerName,
|
||||
|
||||
Reference in New Issue
Block a user