Widget:AllusionsCharts: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 56: | Line 56: | ||
function divClickHandler () { | |||
var delay = 25; | var delay = 25; | ||
var p = this.nextElementSibling.firstElementChild; | var p = this.nextElementSibling.firstElementChild; | ||
Line 84: | Line 84: | ||
function toggleRow (s, state) { | |||
s.style.display = state; | s.style.display = state; | ||
}; | }; | ||
Line 123: | Line 123: | ||
var t = window.IRHB.timeline; | var t = window.IRHB.timeline; | ||
var queryProps = window.IRHB.getQueryProps(); | var queryProps = window.IRHB.getQueryProps(); | ||
var valuesAr, nVals; | var valuesAr, nVals; | ||
var chartOptions = { | var chartOptions = { | ||
"scales": { | "scales": { | ||
Line 177: | Line 174: | ||
}; | }; | ||
get = function (elem) { | var get = window.IRHB.get || function get (elem) { | ||
if (typeof elem === "string") { | if (typeof elem === "string") { | ||
elem = document.getElementById(elem); | elem = document.getElementById(elem); | ||
Line 183: | Line 180: | ||
return elem; | return elem; | ||
}; | }; | ||
replaceAll = function (str, find, replacement) { | replaceAll = function (str, find, replacement) { | ||
Line 189: | Line 185: | ||
}; | }; | ||
function escapeRegEx (str) { | |||
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | ||
}; | }; |
Revision as of 19:17, 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.