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 #16124
This commit is contained in:
		@@ -70,6 +70,8 @@ block content
 | 
				
			|||||||
                $(document).ready(function () {
 | 
					                $(document).ready(function () {
 | 
				
			||||||
                    var cal = new CalHeatMap();
 | 
					                    var cal = new CalHeatMap();
 | 
				
			||||||
                    var calendar = !{JSON.stringify(calender)};
 | 
					                    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({
 | 
					                    cal.init({
 | 
				
			||||||
                        itemSelector: "#cal-heatmap",
 | 
					                        itemSelector: "#cal-heatmap",
 | 
				
			||||||
                        domain: "month",
 | 
					                        domain: "month",
 | 
				
			||||||
@@ -89,6 +91,9 @@ block content
 | 
				
			|||||||
                            position: "top"
 | 
					                            position: "top"
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    });
 | 
					                    });
 | 
				
			||||||
 | 
					                    calLegendTitles.forEach(function(title, i) {
 | 
				
			||||||
 | 
					                        document.querySelector(rectSelector + (i + 1).toString() + '> title').innerHTML = title;
 | 
				
			||||||
 | 
					                    });
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
        .row
 | 
					        .row
 | 
				
			||||||
            .hidden-xs.col-sm-12.text-center
 | 
					            .hidden-xs.col-sm-12.text-center
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user