Template:AllusionsCharts: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
* '''Section''' – value can be 'Records', defaults to 'Allusions' | * '''Section''' – value can be 'Records', defaults to 'Allusions' | ||
* '''Category''' – category on which to base charts, defaulting to 'Allusions'<!-- in Allusions section, 'Records' in Historiography section-->. | * '''Category''' – category on which to base charts, defaulting to 'Allusions'<!-- in Allusions section, 'Records' in Historiography section-->. | ||
* '''HideXaxis''' – if set to value other than 'false', index on x-axis of timeline is hidden, defaults to 'false'.</div></noinclude><includeonly>__NOTOC__{{#vardefine:section|{{#ifeq:{{{Section|}}}||Allusions|{{{Section}}}}}}}{{#vardefine:content|{{#ifeq:{{#pos:{{PAGENAME}}|links}}||texts|links}}}}{{#vardefine:period|{{#sub:{{#replace:{{PAGENAME}}|{{#var:section}}|}}|0|9}}}}{{#vardefine:category|{{{Category|{{#var:section}}}}}}}{{#vardefine:Century|{{#ifeq:{{PAGENAME}}|Allusions|all|{{#ifeq:{{PAGENAME}}|Historiography|all|{{#ifeq:{{{Category|}}}||{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|-}}+1}}|2}}|all}}}}}}}}{{#vardefine:from|{{#ifeq:{{#var:section}}|Allusions|14|13}}}}{{#vardefine:to|{{#ifeq:{{#var:section}}|Allusions|21|20}}}} | * '''HideXaxis''' – if set to value other than 'false', index on x-axis of timeline is hidden, defaults to 'false'.</div></noinclude><includeonly>__NOTOC__<!--{{#vardefine:section|{{#ifeq:{{{Section|}}}||Allusions|{{{Section}}}}}}}{{#vardefine:content|{{#ifeq:{{#pos:{{PAGENAME}}|links}}||texts|links}}}}{{#vardefine:period|{{#sub:{{#replace:{{PAGENAME}}|{{#var:section}}|}}|0|9}}}}{{#vardefine:category|{{{Category|{{#var:section}}}}}}}{{#vardefine:Century|{{#ifeq:{{PAGENAME}}|Allusions|all|{{#ifeq:{{PAGENAME}}|Historiography|all|{{#ifeq:{{{Category|}}}||{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|-}}+1}}|2}}|all}}}}}}}}{{#vardefine:from|{{#ifeq:{{#var:section}}|Allusions|14|13}}}}{{#vardefine:to|{{#ifeq:{{#var:section}}|Allusions|21|20}}}}--> | ||
{{#vardefine:section|{{#ifeq:{{{Section|}}}||Records|{{{Section}}}}}}} | |||
{{#vardefine:content|links}} | |||
{{#vardefine:period|1401-1500}} | |||
{{#vardefine:category|{{{Category|{{#var:section}}}}}}} | |||
<!--{{#vardefine:Century|{{#ifeq:{{PAGENAME}}|Test|all|{{#ifeq:{{PAGENAME}}|Historiography|all|{{#ifeq:{{{Category|}}}||{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|-}}+1}}|2}}|all}}}}}}}}--> | |||
{{#vardefine:Century|15}} | |||
{{#vardefine:from|{{#ifeq:{{#var:section}}|Allusions|14|13}}}} | |||
{{#vardefine:to|{{#ifeq:{{#var:section}}|Allusions|21|20}}}} | |||
<div class="jsCharts" id="cChart" data-category="{{#var:category}}" data-section="{{#var:section}}" data-century="{{#var:Century}}" | <div class="jsCharts" id="cChart" data-category="{{#var:category}}" data-section="{{#var:section}}" data-century="{{#var:Century}}" | ||
data-tocentury="{{#var:to}}" data-fromcentury="{{#var:from}}"> | data-tocentury="{{#var:to}}" data-fromcentury="{{#var:from}}"> | ||
Line 12: | Line 20: | ||
|template=AlChartData | |template=AlChartData | ||
|link=none | |link=none | ||
}} | }}</div> | ||
</div> | <div class="jsCharts" id="dChart"> | ||
<div class="jsCharts" id=" | |||
</div> | </div> | ||
<div class="jsCharts" id="tline"> | <div class="jsCharts" id="tline"> | ||
</div> | </div> | ||
{{#Widget: | {{#Widget:AlChartsX}}</includeonly> |
Revision as of 13:08, 26 April 2019
This template renders the charts on the section and century landing pages in the Allusions section of IRHB. It takes three optional parameters.
- Section – value can be 'Records', defaults to 'Allusions'
- Category – category on which to base charts, defaulting to 'Allusions'.
- HideXaxis – if set to value other than 'false', index on x-axis of timeline is hidden, defaults to 'false'.