<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Template%3ABrick_chart%2Fdoc</id>
	<title>Template:Brick chart/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Template%3ABrick_chart%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:Brick_chart/doc&amp;action=history"/>
	<updated>2026-07-14T20:59:18Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Template:Brick_chart/doc&amp;diff=3261344&amp;oldid=prev</id>
		<title>imported&gt;SparklingLover 来自 2022年12月6日 (二) 06:10</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:Brick_chart/doc&amp;diff=3261344&amp;oldid=prev"/>
		<updated>2022-12-06T06:10:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
块图是将矩形化为多个块表示比例的图形。&lt;br /&gt;
__NOTOC__&lt;br /&gt;
=== 字段说明 ===&lt;br /&gt;
* value1-value9 – 每个块的值，可以是整数、小数、公式或者用“+”连接整数和分数来表示带分数&lt;br /&gt;
* label1-label9 – 每个块的标签，显示在图例中&lt;br /&gt;
* color1-color9 – 每个块的颜色&lt;br /&gt;
* caption – 图例的标题&lt;br /&gt;
* total &amp;amp;nbsp; – 块的总数（默认100）&lt;br /&gt;
* stride – 每行最多有几个块（默认10）&lt;br /&gt;
* unit{{ns}}– 块的单位（默认为%）&lt;br /&gt;
* width – 表宽&lt;br /&gt;
* brick_size - 每块代表的值（默认为1）&lt;br /&gt;
* align &amp;amp;nbsp;– 左对齐或者右对齐（left/right，默认为右对齐）&lt;br /&gt;
* legend_margin=0 0 0 6px – 指左边沿偏移6px (默认为3px 0 0 10px).&lt;br /&gt;
&lt;br /&gt;
=== 示例 ===&lt;br /&gt;
{{Brick chart |style=Bricks&lt;br /&gt;
| caption=Example of 6 amounts&lt;br /&gt;
| value1=42 | label1=one&lt;br /&gt;
| value2=32 | label2=two&lt;br /&gt;
| value3=12 | label3=three&lt;br /&gt;
| value4=3 | label4=four&lt;br /&gt;
| value5=2 | label5=five&lt;br /&gt;
| value6=0.4 | label6=six&lt;br /&gt;
}}&lt;br /&gt;
The following 2 examples have numbers in the range of 0-100 units, as percentages. The total is assumed as total=100, to calculate the &amp;quot;other&amp;quot; amount by subtracting all brick values from 100.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Brick chart&lt;br /&gt;
| caption=Example of 6 amounts&lt;br /&gt;
| value1=42 | label1=one&lt;br /&gt;
| value2=32 | label2=two&lt;br /&gt;
| value3=12 | label3=three&lt;br /&gt;
| value4=3 | label4=four&lt;br /&gt;
| value5=2 | label5=five&lt;br /&gt;
| value6=0.4 | label6=six&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note how the bottom value, &amp;lt;code&amp;gt;value6=0.4&amp;lt;/code&amp;gt;, generates a &amp;quot;tiny sliver&amp;quot; of a brick, and the calculated remainder, the &amp;quot;other&amp;quot; value is also a decimal amount as 8.6.&lt;br /&gt;
&lt;br /&gt;
The brick colours use the defaults: red, dark green, blue, yellow, purple, and [[青色|cyan]], as the first 6 hues. The next example, below, shows use of some colour parameters by setting: &amp;lt;code&amp;gt;color1, color2, color3&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{clear}}&amp;lt;hr width=380px&amp;gt;&lt;br /&gt;
{{Brick chart&lt;br /&gt;
| caption=Religion in the Czech Republic&lt;br /&gt;
| label1 = [[无神论]]s / [[不可知论]]s&lt;br /&gt;
  | value1 = 59 | color1 = silver&lt;br /&gt;
| label2 = [[天主教會s]]&lt;br /&gt;
  | value2 = 26.8 | color2 = #008&lt;br /&gt;
| label3 = [[新教]]&lt;br /&gt;
  | value3 = 2.5 | color3 = #08f&lt;br /&gt;
| legend_margin=0 0 0 6px&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Brick chart&lt;br /&gt;
| caption=Religion in the Czech Republic&lt;br /&gt;
| label1 = [[无神论]]s / [[不可知论]]s&lt;br /&gt;
  | value1 = 59 | color1 = silver&lt;br /&gt;
| label2 = [[天主教會]]&lt;br /&gt;
  | value2 = 26.8 | color2 = #008&lt;br /&gt;
| label3 = [[新教]]&lt;br /&gt;
  | value3 = 2.5 | color3 = #08f&lt;br /&gt;
| legend_margin=0 0 0 6px&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The 2nd example, for Religion in the Czech Republic, shows the use of indented parameters for the value/color under each label phrase. The color #008 (for &amp;quot;Catholic&amp;quot;) is a [[十六进制|hexadecimal]] code for dark blue, using [[三原色光模式|RGB]] notation, where the 3rd digit &amp;quot;8&amp;quot; is half of blue intensity levels, 0-F.&lt;br /&gt;
&lt;br /&gt;
It is customary to list the larger percentages first, in a table; however, the numbers can be displayed in any order as needed for the text on a page. A small decimal amount, such as 0.4, will show a tiny sliver among the various brick bars.&lt;br /&gt;
&lt;br /&gt;
The option &amp;quot;legend_margin=0 0 0 6px&amp;quot; resets the alignment of the legend boxes, as only 6 [[像素|pixels]] from the left margin (default: 3px 0 0 10px).&lt;br /&gt;
{{clear}}&lt;br /&gt;
{{Brick chart |style=Bricks&lt;br /&gt;
|caption = 德国国会议席分布&lt;br /&gt;
|total = 614&lt;br /&gt;
|unit = 席&lt;br /&gt;
|stride = 20&lt;br /&gt;
|brick_size=2.6&lt;br /&gt;
|label1=[[德国基督教民主联盟]]&lt;br /&gt;
  | color1=black&lt;br /&gt;
  | value1=180&lt;br /&gt;
|label2=[[巴伐利亚基督教社会联盟]]&lt;br /&gt;
  | color2=#ccf&lt;br /&gt;
  | value2=46&lt;br /&gt;
|label3=[[德国社会民主党]]&lt;br /&gt;
  | color3=red&lt;br /&gt;
  | value3=222&lt;br /&gt;
|label4=[[自由民主党 (德国)]]&lt;br /&gt;
  | color4=yellow&lt;br /&gt;
  | value4=61&lt;br /&gt;
|label5=[[民主社会主义党 (德国)]]&lt;br /&gt;
  | color5=#800&lt;br /&gt;
  | value5=54&lt;br /&gt;
|label6=[[联盟90/绿党]]&lt;br /&gt;
  | color6=green&lt;br /&gt;
  | value6=51&lt;br /&gt;
}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Larger amounts:&amp;#039;&amp;#039;&amp;#039; The following example has numbers in the range of 0-300 units, as counts. The total is set to total=614. The options stride=20 and brick_size=2.6 scale the bar line segments to fit within the box, rather than 6x times larger, as 614 compared to 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Brick chart&lt;br /&gt;
|caption = 德国国会议席分布&lt;br /&gt;
|total = 614&lt;br /&gt;
|unit = 席&lt;br /&gt;
|stride = 20&lt;br /&gt;
|brick_size=2.6&lt;br /&gt;
|label1=[[基督教民主联盟党]]&lt;br /&gt;
  | color1=black&lt;br /&gt;
  | value1=180&lt;br /&gt;
|label2=[[巴伐利亚基督教社会联盟]]&lt;br /&gt;
  | color2=#ccf&lt;br /&gt;
  | value2=46&lt;br /&gt;
|label3=[[德国社会民主党]]&lt;br /&gt;
  | color3=red&lt;br /&gt;
  | value3=222&lt;br /&gt;
|label4={{tsl|en|Free Democratic Party|}}&lt;br /&gt;
  | color4=yellow&lt;br /&gt;
  | value4=61&lt;br /&gt;
|label5=[[民主社会主义党 (德国)]]&lt;br /&gt;
  | color5=#800&lt;br /&gt;
  | value5=54&lt;br /&gt;
|label6=[[联盟90/绿党]]&lt;br /&gt;
  | color6=green&lt;br /&gt;
  | value6=51&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 程序效率 ==&lt;br /&gt;
The Template:Brick_chart draws the chart by using div-tags (&amp;quot;&amp;amp;lt;div&amp;gt;&amp;quot;) to show colored bars for line segments of the calculated length. The template can format a brick chart within 1/6 second, so 3 brick charts could appear within a page and add only 1/2 second to reformat, or edit-preview. The initial creation of the template occurred in August 2009; however, the alignment for display problems with overlapped bars was fixed in September 2012, over 3 years later.&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* {{tl|Pie chart}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox |&lt;br /&gt;
| &amp;lt;!-- CATEGORIES BELOW THIS LINE, PLEASE: --&amp;gt;&lt;br /&gt;
[[Category:圖表模板]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;SparklingLover</name></author>
	</entry>
</feed>