• Laman Utama
  • Rawak
  • Berdekatan
  • Log masuk
  • Tetapan
Donate Now If Wikipedia is useful to you, please give today.
  • Perihal Wikipedia
  • Penafian
Wikipedia

Templat:Chart

  • Bahasa
  • Pantau
  • Sunting
Pendokumenan templat[lihat] [sunting] [sejarah] [nyahcache]
Templat ini menggunakan ciri-ciri sintaks templat yang rumit.
Anda digalakkan untuk membiasakan diri dengan persediaan dan fungsi penghurai sebelum menyunting templat ini. Jika suntingan anda menyebabkan masalah yang tidak diduga, sila undurkannya dengan segera kerana templat ini mungkin digunakan di sebilangan besar halaman.
Ingat bahawa anda boleh menjalankan uji kaji dan perlu menguji semua penambahbaikan, sama ada di /kes-kes ujian atau laman pengguna anda sebelum melakukan sebarang perubahan. (lihat sejarah)
Pendokumenan templat berikut ditransklusikan daripada Templat:Chart/doc [sunting]

This is a template for rendering simple diagrams consisting of boxes and connecting lines based loosely on an ASCII art-like syntax. The trees are displayed as HTML tables using CSS attributes, and may contain arbitrary wiki markup within the boxes. This implementation was based on the {{familytree}} template.

Isi kandungan

  • 1 Penggunaan
  • 2 Parameter
  • 3 Style attributes
  • 4 Migrasi dari templat familytree
  • 5 Errors
  • 6 See also

Penggunaan

sunting

Kod ini:

{{chart/start}}
{{chart| | | | GrMa |~|y|~| GrPa | | GrMa=Nenek|GrPa=Atuk}}
{{chart| | | | | | | |)|-|-|-|.| }}
{{chart| | | MOM |y| DAD | |DAISY| MOM=Ibu|DAD=Bapa|DAISY=[[Makcik Daisy]]}}
{{chart| |,|-|-|-|+|-|-|-|.| | | }}
{{chart| JOE | | ME  | | SIS | | | JOE=Abang saya Joe|ME='''Saya!'''|SIS=Adik perempuan}}
{{chart/end}}

Menghasilkan ini:

NenekAtuk
IbuBapaMakcik Daisy
Abang saya JoeSaya!Adik perempuan

Parameter

sunting

The template accepts up to 50 unnamed parameters with each parameter specifying a tile or a box.

  • Boxes can contain arbitrary wiki markup. The content of each box is specified using additional named parameters appended to the template call. Each box is three tiles wide and normally has a black border two pixels wide. Boxes can have any name that is a valid template parameter name, subject to a minimum of two alphabetical characters.
  • Tiles are line drawing symbols used to connect the boxes. They consist of various styles of horizontal and vertical lines along with corners and crossings as needed. Tiles are specified using their one- or two-character name: for the most common tiles, that character is more or less approximate to the tile's appearance. A special case of a tile is the empty tile, specified by a single space character. A table of available tiles is given below.
Garis sambung (A):
!
  ,
  v
  .
 
-
  )
  +
  (
 
`
  ^
  '
 
Garis putus-putus (B):
:
  F
  V
  7
 
~
  D
  %
  C
 
L
  A
  J
 
Garis titik-titik (C):
Q
  S
  M
  T
 
P
  H
  R
  G
 
Y
  W
  Z
 
Campuran (A+B), (A+C), (B+C):
p
  u
{{{u}}}
  q
        f
        r2
 
E
{{{E}}}
  *
  3
{{{3}}}
        k
  a
  l
        k2
  a2
  l2
 
b
  n
  d
        e
        q2
 
 
r
  y
  z
{{{z}}}
        m
        m2
 
6
{{{6}}}
  t
  9
{{{9}}}
        o
  i
  g
{{{g}}}
        o2
  b2
  p2
 
c
  h
  j
        w
{{{w}}}
        n2
 


Style attributes

sunting

Penampilan untuk kekotak boleh dikawal dengan templat parameter pilihan berikut:

  • border merujuk kepada kelebaran sempadan kekotak dalam unit pixels,
  • boxstyle boleh digunakan untuk menambah arbitrary CSS declarations terus kepada box style attributes.

Sebagai contoh, kod berikut:

{{chart/start}}
{{chart|border=0|boxstyle=background:#dfd;| | FOO |y| BAR | |FOO=Box 1|BAR=Box 2}}
{{chart|border=0|boxstyle=background:#dfd;| | |,|-|^|-|.| | }}
{{chart|border=0|boxstyle=background:#dfd;| | FOO | | BAR | |FOO=Box 3|BAR=Box 4}}
{{chart/end}}

akan menghasilkan carta:

Box 1Box 2
Box 3Box 4

Style attributes juga boleh disetkan kepada kekotak secara individu, seperti contoh dibawah:

{{chart/start}}
{{chart| | | | |CLEAR| | | | |CLEAR=Clear box}}
{{chart| |,|-|-|'|!|`|-|-|.| }}
{{chart|RED  |~|GREEN|~|BLUE |RED=Red box|GREEN=Green box|BLUE=Blue box
|boxstyle_RED  =background-color: #faa;
|boxstyle_GREEN=background-color: #afa;
|boxstyle_BLUE =background-color: #aaf;
}}
{{chart/end}}

yang mana menghasilkan ini:

Clear box
Red boxGreen boxBlue box

NOTE: When specifying style attributes for individual named boxes, make sure the box names are aligned to the left side of the area reserved for them in the template call (as in "|RED  |" instead of "| RED |" in the example above), otherwise the template will end up looking for a style parameter with spaces in its name.

The {{chart/start}} template also accepts an optional style parameter that can be used to set CSS styles for the entire diagram.

Migrasi dari templat familytree

sunting

Templat {{chart}} kebanyakannya sesuai digunakan dari templat asal {{familytree}}. Walaubagaimanapun, untuk menggunakan fungsi tambahan yang ditawarkan dengan templat ini, diagram mesti dikemaskini / diganti berdasarkan kaedah templat {{chart}}. Diagram templat dan sub-templat {{familytree}} boleh diubah kepada templat {{chart}} dengan menukar wikiteks familytree kepada chart. Beberapa penambahbaikan telah dilakukan dari {{familytree}} dengan menggabungkan garis sambung dan garis putus-putus dan gambarajah dibawah menunjukkan perbezaannya :

Tile {{familytree}} {{chart}}
{{{z}}}
n z
{{{6}}}
] 6
# t
{{{9}}}
[ 9
t n

Lastly, if any uses of the {{familytree}} template end with |}}, that vertical bar should be removed, leaving the last cell in that row containing either some text or a space.

The familytree.js tool below can be used to convert between syntaxes. Just change the start tag when in edit view, then click "Art → Templates" to toggle back to wikitext view. The other templates will be updated to match.

Errors

sunting
  • Template:Chart/cellb will be caused by any instance of |}} change this to }}
  • Template:Chart/celltTemplate:Chart/cellb will be caused by any instance of || change this to | |

See also

sunting
  • familytree.js – tool to easily create or update diagrams using these templates
Pendokumenan di atas ditransklusikan daripada Templat:Chart/doc. (sunting | sejarah)
Penyunting boleh membuat percubaan di laman kotak pasir (cipta | cermin) dan kes ujian (cipta) templat ini.
Sila letakkan kategori di sublaman /doc. Sublaman templat ini.
Diambil daripada "https://ms.wikipedia.org/w/index.php?title=Templat:Chart&oldid=4512190"
Kali terakhir disunting pada 10 Januari 2019, 14:43

Bahasa

    • العربية
    • অসমীয়া
    • Авар
    • Azərbaycanca
    • تۆرکجه
    • Bahasa Indonesia
    • Basa Bali
    • বাংলা
    • Беларуская
    • भोजपुरी
    • Bikol Central
    • Bosanski
    • Български
    • Cymraeg
    • Dagbanli
    • Dansk
    • الدارجة
    • Eesti
    • Ελληνικά
    • English
    • Español
    • Euskara
    • فارسی
    • Føroyskt
    • Galego
    • ગુજરાતી
    • 한국어
    • Hausa
    • Հայերեն
    • हिन्दी
    • Ilokano
    • Jawa
    • ქართული
    • Қазақша
    • Kurdî
    • ລາວ
    • Latviešu
    • Lietuvių
    • Li Niha
    • मैथिली
    • Македонски
    • മലയാളം
    • मराठी
    • မြန်မာဘာသာ
    • नेपाली
    • 日本語
    • Norsk bokmål
    • ଓଡ଼ିଆ
    • Oʻzbekcha / ўзбекча
    • ਪੰਜਾਬੀ
    • پنجابی
    • پښتو
    • တႆး
    • Polski
    • Português
    • Română
    • Русский
    • ᱥᱟᱱᱛᱟᱲᱤ
    • Scots
    • සිංහල
    • Simple English
    • سنڌي
    • Slovenščina
    • کوردی
    • Српски / srpski
    • Suomi
    • தமிழ்
    • తెలుగు
    • ไทย
    • Tiếng Việt
    • Тоҷикӣ
    • Türkçe
    • Українська
    • اردو
    • 文言
    • ייִדיש
    • Yorùbá
    • 粵語
    • 中文
    • Betawi
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • Laman ini kali terakhir disunting pada 14:43, 10 Januari 2019.
    • Kandungan disediakan dengan CC BY-SA 4.0 kecuali jika dinyatakan sebaliknya.
    • Dasar privasi
    • Perihal Wikipedia
    • Penafian
    • Kod Tatakelakuan
    • Pembangun
    • Statistik
    • Kenyataan kuki
    • Syarat-syarat Penggunaan
    • Atas meja