Content deleted Content added
nowrap number and percentage Tag: Reverted |
Auntie Kathleen (talk | contribs) No edit summary Tags: Manual revert Reverted |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{2}}}|1|<div style="width:100px;"><!-- |
<includeonly>{{#ifeq:{{{2}}}|1|<div style="width:100px;"><!-- |
||
--->{{#ifeq:{{{per|}}}|true |
--->{{#ifeq:{{{per|}}}|true|{{{1|}}}% {{{point-in-time|}}}{{hsp}}{{{ref|}}}}}<!-- |
||
---><div role="img" style="border-color:none;box-sizing: border-box; border: 1px solid #aaa;border-radius:0.2em; height: 1.0em; position: relative;"><div style="background-color: {{#ifexpr:{{formatnum:{{{1|}}}}} > 80|red|{{#ifexpr:{{formatnum:{{{1|}}}}} > 60|orange|{{#ifexpr:{{formatnum:{{{1|}}}}} > 40|yellow|{{#ifexpr:{{formatnum:{{{1|}}}}} > 20|green|darkgreen}} }} }} }}; width: {{{1|}}}%; height: 100%;"></div></div>{{{1|}}} |
---><div role="img" style="border-color:none;box-sizing: border-box; border: 1px solid #aaa;border-radius:0.2em; height: 1.0em; position: relative;"><div style="background-color: {{#ifexpr:{{formatnum:{{{1|}}}}} > 80|red|{{#ifexpr:{{formatnum:{{{1|}}}}} > 60|orange|{{#ifexpr:{{formatnum:{{{1|}}}}} > 40|yellow|{{#ifexpr:{{formatnum:{{{1|}}}}} > 20|green|darkgreen}} }} }} }}; width: {{{1|}}}%; height: 100%;"></div></div>{{{1|}}}}}</includeonly><noinclude> |
||
{{Documentation}}</noinclude> |
{{Documentation}}</noinclude> |
Revision as of 08:40, 21 January 2023
Template documentation[view] [edit] [history] [purge]
Usage
There is only one parameter - wikidata item P8843 - passed from {{PH wikidata}} as parameter {{PH composition bar|{{{1|}}}}}
Adds a composition bar chart being a horizontal coloured block, whose colour and width shows the value.
Colour follows:
Level Poverty Estimates | ||
0 – 20 | 9999 | Olive Drab |
20 – 40 | 9999 | LimeGreen |
40 – 60 | 9999 | darker Yellow |
60 – 80 | 9999 | Orange |
80 – 100 | 9999 | Red |
Colour follows Philippine Statistics Authority documents.
For example:
1 Dagohoy, Bohol
{{PH composition bar|{{#invoke:Wikidata|property|Q404854|P8843|FETCH_WIKIDATA}}}}
2 Hadji Mohammad Ajul
{{PH composition bar|{{#invoke:Wikidata|property|Q41998|P8843|FETCH_WIKIDATA}}}}
3 Mandaue
{{PH composition bar|{{#invoke:Wikidata|property|Q1889017|P8843|FETCH_WIKIDATA}}}}