Commit 5c27ed6b by Chris Rodriguez

Fixing undefined

parent f2c1f4e5
...@@ -130,18 +130,20 @@ $(function () { ...@@ -130,18 +130,20 @@ $(function () {
} }
} else { } else {
s = {}; s = {};
s.data = m; s.data = 0;
s.tick = series[k]['data'][0][0]; s.tick = series[k]['data'][0][0];
s.label = series[k]['label']; s.label = series[k]['label'];
series_order_object.push(s); series_order_object.push(s);
} }
} }
// reorder the series_order_object object to match the ticks, which is the correct order // reorder the series_order_object object to match the ticks, which is the correct order
series_order_object.sort(function(a, b) { series_order_object.sort(function(a, b) {
return a.tick-b.tick; return a.tick-b.tick;
}); });
// console.log(series_order_object);
// hide the vertical axis since they are audibly lacking context // hide the vertical axis since they are audibly lacking context
for (var i = 0; i < grade_cutoff_ticks.length; i++) { for (var i = 0; i < grade_cutoff_ticks.length; i++) {
grade_cutoff_ticks[i][1] = '<span aria-hidden="true">' + grade_cutoff_ticks[i][1] + '</span>'; grade_cutoff_ticks[i][1] = '<span aria-hidden="true">' + grade_cutoff_ticks[i][1] + '</span>';
...@@ -180,9 +182,7 @@ $(function () { ...@@ -180,9 +182,7 @@ $(function () {
max: ${tickIndex - sectionSpacer}, max: ${tickIndex - sectionSpacer},
ticks: function() { ticks: function() {
for (var i = 0; i < ticks.length; i++) { for (var i = 0; i < ticks.length; i++) {
if (series_order_object[i] && series_order_object[i].tick) { ticks[i][1] = '<span class="aria-hidden=true">' + ticks[i][1] + '</span><span class="sr">' + detail_tooltips[series_order_object[i].label][series_order_object[i].data] + '</span>';
ticks[i][1] = '<span class="aria-hidden=true">' + ticks[i][1] + '</span><span class="sr">' + detail_tooltips[series_order_object[i].label][series_order_object[i].data] + '</span>';
}
} }
return ticks; return ticks;
}, },
......
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