fix(server/views/account): Change default text of heatmap legend
The default text of the legend is confusing given the low range of values used. Cal-heatmap expects higher legend values, such as [10, 20, 30, 40], rather than [1, 2, 3]. This change will hopefully make the mouseover text for the legend a little less confusing. BREAKING CHANGE: None Closes #16124pull/16132/head
parent
69fa4b3098
commit
924e7f19d6
|
@ -70,6 +70,8 @@ block content
|
|||
$(document).ready(function () {
|
||||
var cal = new CalHeatMap();
|
||||
var calendar = !{JSON.stringify(calender)};
|
||||
var rectSelector = "#cal-heatmap > svg > svg.graph-legend > g > rect.r";
|
||||
var calLegendTitles = ["0 items", "1 item", "2 items", "3 or more items"]
|
||||
cal.init({
|
||||
itemSelector: "#cal-heatmap",
|
||||
domain: "month",
|
||||
|
@ -89,6 +91,9 @@ block content
|
|||
position: "top"
|
||||
}
|
||||
});
|
||||
calLegendTitles.forEach(function(title, i) {
|
||||
document.querySelector(rectSelector + (i + 1).toString() + '> title').innerHTML = title;
|
||||
});
|
||||
});
|
||||
.row
|
||||
.hidden-xs.col-sm-12.text-center
|
||||
|
|
Loading…
Reference in New Issue