Widget:AllusionsCharts: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 9: | Line 9: | ||
window.IRHB.get = window.IRHB.get || function get (elem) { | |||
if (typeof elem === "string") { | if (typeof elem === "string") { | ||
elem = document.getElementById(elem); | elem = document.getElementById(elem); | ||
Line 133: | Line 133: | ||
var queryProps = window.IRHB.getQueryProps(); | var queryProps = window.IRHB.getQueryProps(); | ||
var valuesAr, nVals; | var valuesAr, nVals; | ||
var get = window.IRHB.get; | |||
var chartOptions = { | var chartOptions = { | ||
"scales": { | "scales": { | ||
Line 182: | Line 184: | ||
}; | }; | ||
function replaceAll (str, find, replacement) { | |||
return str.replace(new RegExp(escapeRegEx(find), 'g'), replacement); | return str.replace(new RegExp(escapeRegEx(find), 'g'), replacement); | ||
}; | }; | ||
function escapeRegEx (str) { | function escapeRegEx (str) { |
Revision as of 19:23, 21 May 2019
This widget renders the charts on the section and century landing pages in the Allusions section and Records sub-section of IRHB. It takes no parameters.