<?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%3APie_chart%2Fdoc</id>
	<title>Template:Pie 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%3APie_chart%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:Pie_chart/doc&amp;action=history"/>
	<updated>2026-07-16T16:43:32Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Template:Pie_chart/doc&amp;diff=1979886&amp;oldid=prev</id>
		<title>imported&gt;For Each ... Next：​/* 參見 */</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:Pie_chart/doc&amp;diff=1979886&amp;oldid=prev"/>
		<updated>2025-06-08T16:38:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;參見&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;&amp;lt;!-- 在這裡加入模板的保護標識 --&amp;gt;&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;{{template doc page viewed directly}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- 在本行下編輯模板說明 --&amp;gt;&lt;br /&gt;
{{缺乏中文說明}}&lt;br /&gt;
&lt;br /&gt;
== 模板介紹 ==&lt;br /&gt;
這是製作[[圓餅圖]]的模板&lt;br /&gt;
&lt;br /&gt;
== 使用方法 ==&lt;br /&gt;
本模板可以指定最多30個扇區及其圖例。六個扇區的參數示例如下：&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{Pie chart&lt;br /&gt;
| radius = 100&lt;br /&gt;
| thumb = &lt;br /&gt;
| caption = &lt;br /&gt;
| other = &lt;br /&gt;
| label1 =remember &lt;br /&gt;
| value1 =16.6&lt;br /&gt;
| color1 =2&lt;br /&gt;
| label2 =understand&lt;br /&gt;
| value2 =16.6&lt;br /&gt;
| color2 =3 &lt;br /&gt;
| label3 =apply&lt;br /&gt;
| value3 =16.6 &lt;br /&gt;
| color3 =5 &lt;br /&gt;
| label4 =analyze&lt;br /&gt;
| value4 =16.6&lt;br /&gt;
| color4 =6&lt;br /&gt;
| label5 =evaluate&lt;br /&gt;
| value5 =16.6&lt;br /&gt;
| color5 =9&lt;br /&gt;
| label6 =design&lt;br /&gt;
| value6 =16.6&lt;br /&gt;
| color6 =10&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* {{para|radius}} 參數用於設定圓餅圖的半徑，預設為100&lt;br /&gt;
* {{para|thumb}} 參數可以使整個模板向左或向右浮動顯示，預設值 &amp;lt;code&amp;gt;right&amp;lt;/code&amp;gt;。&lt;br /&gt;
* {{para|caption}} 參數可在圖例上方增加題註。&lt;br /&gt;
* {{para|other}} 用於替換「其他」圖例的顯示文本。&lt;br /&gt;
* each &amp;quot;label&amp;#039;&amp;#039;N&amp;quot;&amp;#039;&amp;#039; is a string of text that appears in the legend entry for a slice. Omitting it will cause a legend entry to not be shown for that slice.&lt;br /&gt;
* each &amp;quot;value&amp;#039;&amp;#039;N&amp;quot;&amp;#039;&amp;#039; is the percentage that the slice represents. Do &amp;#039;&amp;#039;not&amp;#039;&amp;#039; include the percent sign. Also note that it is shown in the legend as written (just after the label), without any rounding or other reformatting.&lt;br /&gt;
* each &amp;quot;color&amp;#039;&amp;#039;N&amp;quot;&amp;#039;&amp;#039; is a [[Web colors|CSS color code or name]]. If omitted, it will default to the following hues:&lt;br /&gt;
::{|&lt;br /&gt;
| valign=top |&lt;br /&gt;
:1. {{legend|red|red}}&lt;br /&gt;
:2. {{legend|green|green}}&lt;br /&gt;
:3. {{legend|blue|blue}}&lt;br /&gt;
: {{nb5}}{{nb5}}{{nb5}}{{nb5}}&lt;br /&gt;
| valign=top |&lt;br /&gt;
:4. {{legend|yellow|yellow}}&lt;br /&gt;
:5. {{legend|fuchsia|fuchsia}}&lt;br /&gt;
:6. {{legend|aqua|aqua}}&lt;br /&gt;
: {{nb5}}{{nb5}}{{nb5}}{{nb5}}&lt;br /&gt;
| valign=top |&lt;br /&gt;
:7. {{legend|brown|brown}}&lt;br /&gt;
:8. {{legend|orange|orange}}&lt;br /&gt;
: {{nb5}}{{nb5}}{{nb5}}{{nb5}}&lt;br /&gt;
| valign=top |&lt;br /&gt;
:9. {{legend|purple|purple}}&lt;br /&gt;
:10. {{legend|sienna|sienna}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 範例 ==&lt;br /&gt;
The following example of [[Template:Pie_chart]] generates the pie chart show at right. &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{Pie chart&lt;br /&gt;
 | caption=[[Religion in the Czech Republic]] as of 2001.&lt;br /&gt;
 | other = yes&lt;br /&gt;
 | label1 = [[Atheist]]s and [[Agnosticism|agnostics]]&lt;br /&gt;
 | value1 = 59 | color1 = silver&lt;br /&gt;
 | label2 = [[Catholic Church|Catholics]]&lt;br /&gt;
 | value2 = 26.8 | color2 = #008&lt;br /&gt;
 | label3 = [[Protestantism|Protestants]]&lt;br /&gt;
 | value3 = 2.5 | color3 = #08f&lt;br /&gt;
 }}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 注意事项 ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The template does not render correctly on mobile devices.&amp;#039;&amp;#039;&amp;#039; See [http://en.m.wikipedia.org/wiki/{{FULLPAGENAMEE}} this page on the mobile site] and [[User talk:PleaseStand/Archive 4#Pie chart|a user&amp;#039;s report of this issue]].&lt;br /&gt;
* Minor issues with printing exist. We also need to implement a good fallback for [[WP:Books|Books]].&lt;br /&gt;
* The values need to be percentages.&lt;br /&gt;
* Google Chrome and Safari do not appear to [[anti-alias]] borders, so the lines are a bit jagged.&lt;br /&gt;
* No labels can be put on the slices themselves.&lt;br /&gt;
* Inherently, it is not possible to save a copy of the chart using the browser&amp;#039;s &amp;quot;Save Image&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
== 參見 ==&lt;br /&gt;
&lt;br /&gt;
* {{tlx|Pie chart new}} — 从英文维基百科引入的船新模板&lt;br /&gt;
&lt;br /&gt;
== 给模板编辑者的说明 ==&lt;br /&gt;
{{Pie chart&lt;br /&gt;
|other = yes&lt;br /&gt;
|value1 = 42&lt;br /&gt;
|label1 = One&lt;br /&gt;
|value2 = 32&lt;br /&gt;
|label2 = Two&lt;br /&gt;
|value3 = 12&lt;br /&gt;
|label3 = Three&lt;br /&gt;
|value4 = 3&lt;br /&gt;
|label4 = Four&lt;br /&gt;
|value5 = 2&lt;br /&gt;
|label5 = Five&lt;br /&gt;
|value6 = 1&lt;br /&gt;
|label6 = Six&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Pie chart&lt;br /&gt;
| caption=[[Religion in the Czech Republic]] as of 2001.&lt;br /&gt;
| other = yes&lt;br /&gt;
| label1 = [[Atheist]]s and [[Agnosticism|agnostics]]&lt;br /&gt;
| value1 = 59&lt;br /&gt;
| color1 = silver&lt;br /&gt;
| label2 = [[Catholic Church|Catholics]]&lt;br /&gt;
| value2 = 26.8&lt;br /&gt;
| color2 = #008&lt;br /&gt;
| label3 = [[Protestantism|Protestants]]&lt;br /&gt;
| value3 = 2.5&lt;br /&gt;
| color3 = #08f&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is an &amp;#039;&amp;#039;experimental&amp;#039;&amp;#039; template that draws pie charts using a single image, a lot of (inline) CSS code generated by parser functions, and &amp;#039;&amp;#039;absolutely no JavaScript&amp;#039;&amp;#039;. It uses a technique for [http://erezsh.wordpress.com/2008/07/31/drawing-diagonal-lines-with-css/ drawing diagonal lines in CSS] exploiting the fact that borders set on elements are [[miter join]]ed. Thus, it is possible to set one border to an opaque color, with the others fully transparent, to form a diagonal line. The angle of the line can be controlled by adjusting the widths of two adjacent borders (one of them opaque) relative to each other.&lt;br /&gt;
&lt;br /&gt;
Note that in the legacy browser [[Internet Explorer 6]], applying transparent borders the standard way does not work. A [http://acidmartin.wordpress.com/2008/08/24/emulating-border-color-transparent-in-internet-explorer-6/ workaround] is used in the form of the [[Wikipedia:Catalogue of CSS classes|CSS class]] &amp;quot;transborder&amp;quot;, which has been added to [[MediaWiki:Common.css]] to make this template usable.&lt;br /&gt;
&lt;br /&gt;
Pie slices are drawn in clockwise order in a counterclockwise direction. These pie slices are positioned:&lt;br /&gt;
* Below a [[:File:Circle frame.svg|200x200px image]] having a transparent circle on a light-colored background (same as the background color used for CSS class &amp;quot;thumbinner&amp;quot;)&lt;br /&gt;
* Inside a container element with &amp;lt;code&amp;gt;overflow: hidden;&amp;lt;/code&amp;gt; set&lt;br /&gt;
This allows only the part of each slice that is inside the circle to be visible on the page.&lt;br /&gt;
&lt;br /&gt;
Most of the code in {{tl|Pie chart/slice}} is divided into five sections, the first four corresponding to quadrants of the circle and the last to cleanly cover the case in which one slice occupies 100% of the chart.&lt;br /&gt;
=== 模板结构 ===&lt;br /&gt;
=== 实现方法 ===&lt;br /&gt;
=== 编辑注意 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- 本行下加入模板的分類 --&amp;gt;&lt;br /&gt;
[[Category:圖表模板]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;For Each ... Next</name></author>
	</entry>
</feed>