Skip to content
Snippets Groups Projects
Commit 98c5e52a authored by Jared Hancock's avatar Jared Hancock
Browse files

Fix rendering issue when range for a column is zero

parent 76d7eccf
No related branches found
No related tags found
No related merge requests found
......@@ -301,15 +301,15 @@ span.label {
tr.append($('<th>').append(row[j]));
else {
val = parseFloat(row[j])||0;
if (val && json.data.length > 1) {
scale = val / range[j]||1;
if (val && range[j] && json.data.length > 1) {
scale = val / range[j];
color = Raphael.hsb(
Math.min((1 - val / range[j]) * .4, 1),
.75, .75);
size = 16 * scale;
}
tr.append($('<td>')
.append($('<div>').css(val ? {
.append($('<div>').css(val && range[j] ? {
'background-color': color,
'width': size,
'height': size,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment