Widget:PlaceNamesChoropleths: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 85: | Line 85: | ||
var cur = d.colours[i]; | var cur = d.colours[i]; | ||
if (val <= cur.limit) { | if (val <= cur.limit) { | ||
colour = cur.rgb; | colour = "#" + cur.rgb; | ||
break; | break; | ||
} | } | ||
Line 232: | Line 232: | ||
'<tr><td>Miscellaneous</td><td colspan="2">' + d.Miscellaneous + '</td></tr>' + | '<tr><td>Miscellaneous</td><td colspan="2">' + d.Miscellaneous + '</td></tr>' + | ||
'<tr><td>Total count</td><td colspan="2">' + d.total + '</td></tr>' + | '<tr><td>Total count</td><td colspan="2">' + d.total + '</td></tr>' + | ||
'<tr><td>Count idx.</td><td>' + d.totalidx + '</td><td style="background-color: | '<tr><td>Count idx.</td><td>' + d.totalidx + '</td><td style="background-color:' + d.totalcol + '; width:1.5em;"></td></tr>' + | ||
'<tr><td>PN/km<sup>2</sup> idx.</td><td>' + d.pnperkm2idx + '</td><td style="background-color: | '<tr><td>PN/km<sup>2</sup> idx.</td><td>' + d.pnperkm2idx + '</td><td style="background-color:' + d.pnperkm2col + '; width:1.5em;"></td></tr>' + | ||
'<tr><td>PN/km<sup>2</sup>/pop. idx.</td><td>' + d.pnperkm2popidx + '</td><td style="background-color: | '<tr><td>PN/km<sup>2</sup>/pop. idx.</td><td>' + d.pnperkm2popidx + '</td><td style="background-color:' + d.pnperkm2popcol + '; width:1.5em;"></td></tr>' + | ||
'</tbody>'; | '</tbody>'; | ||
return txt; | return txt; | ||
Line 361: | Line 361: | ||
svg += '</path></svg>'; | svg += '</path></svg>'; | ||
elem.innerHTML = svg; | elem.innerHTML = svg; | ||
elem.firstElementChild.firstElementChild.style.strokeWidth = "0px"; | |||
}; | }; | ||
Revision as of 19:09, 7 June 2019
This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.