{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Застосування ред.

Шаблон створений на основі {{Bar box}} для медичних таблиць про всі епідемії, пандемії, хронології. На ньому відображаються горизонтальні смуги для 5-ти різних класифікацій для кожної дійсної дати. Також пропонує два стовпчики для явних та відносних чи абсолютних зніних.

Використання ред.

{{Medical cases chart
|barwidth  =  width of the stacked bars area (thin|medium|wide)                    [optional, defaults to: medium]
|numwidth  =  width of the numbers in the right columns (xx or xxxx)<-(n|t|m|w|d)  [optional, defaults to: mm, see Rows explanation]

|pretitle  =  text at the beginning of the title                                   [optional]
|disease   =  name of the disease
|location  =  location of the outbreak the chart is showing
|posttitle =  text at the end of the title                                         [optional]
|outbreak  =  name of the main outbreak (for link of the {{navbar}})

|recoveries=  display recoveries in the legend (no|n|0)                            [optional]
|altlbl1   =  alternate label for the 3rd case classification                      [optional, defaults to: Cases]
|altlbl2   =  alternate label for the 4th case classification                      [optional]
|altlbl3   =  alternate label for the 5th case classification                      [optional]

|togglesbar=  HTML of the toggles bar to show/hide rows                            [optional]  {WIP}

|right1    =  heading of the first data column                                     [optional, defaults to: # of cases]
|right2    =  heading of the second data column                                    [optional]

|rows      =  data rows for each valid date ({{Medical cases chart/Row}})

|caption   =  caption under the chart                                              [optional]
}}

Рядки ред.

The rows parameter should be populated by a sequence of {{Medical cases chart/Row}}. Other bar templates should not be used to keep consistency. The syntax is:

{{Medical cases chart/Row
|1          =  valid date                                                           [defaults to: ⋮, in which case the appropriate changes become (=)]

|2          =  expression for deaths
|3          =  expression for recoveries
|4          =  expression for total cases (3rd classification)
|alttot1    =  alternate expression for active cases (3rd classification)

|5          =  expression for number in 4th classification
|6          =  expression for total in 5th classification
|alttot2    =  alternate expression for number in 5th classification

|7          =  number in the first column
|8          =  change in the first column
|firstright1=  whether a change in the first column is applicable (yes|y|1)

|9          =  number in the second column
|10         =  change in the second column
|firstright2=  whether a change in the second column is applicable (yes|y|1)

|factor     =  scaling factor of the bars                                           [defaults to: 1]
|numwidth   =  width of the numbers in the right columns (xx or xxxx)<-(n|t|m|w|d)  [defaults to: mm]

|collapsible=  whether the row is collapsible (yes|y|1)                             {WIP}
|collapsed  =  manual override of the initial row state (yes|y|1)                   {WIP}
|id         =  manual override of the row id                                        {WIP}
}}

All parameters are optional, although collapsed and id will have no effect if collapsible is not set to true. Ommiting the valid date will treat the row as a date jump, in which no new cases are reported. The expression for total cases has deaths and recoveries automatically subtracted from it. If you want to manually calculate the number in that classification (generally active cases), use alttot1. The same applies to the expression for total in 5th classification and alttot2. The changes in the first and second columns are automatically wrapped in brackets. The factor should be the same for all rows that can be visible at the same time. numwidth is a sequence of the initials of none, thin, medium, wide and default and it determines the width of each number in the data columns. Using xx or xxxx allocates one or two columns, respectively.

Приклад ред.

{{Medical cases chart
|barwidth=wide
|numwidth=mwwd

|pretitle=Approximate
|disease=Spanish Flu
|location=the World
|posttitle=(excluding Oceania)
|outbreak=1918-20 Spanish Flu pandemic

|altlbl1=Confirmed
|altlbl2=Estimated
|altlbl3=Both

|right1=Confirmed cases
|right2=Estimated cases

|rows=
{{Medical cases chart/Row|1918-03-10|(2060-300)|(3000-800)|6000|||6000|firstright1=y|factor=2600|numwidth=mwwd}}
{{Medical cases chart/Row|1918-07|12600|20000|40000|12000||alttot2=(34000-15000-8700+40)|40000|+500%|10500|firstright2=y|factor=2600|numwidth=mwwd}}
{{Medical cases chart/Row||12600|20000|40000|12000||alttot2=(34000-15000-8700+40)|40000||10500|factor=2600|numwidth=mwwd}}
{{Medical cases chart/Row|1919|100000|250000|||1000000|||1mi|+500k|factor=2600|numwidth=mwwd}}

|caption=Foo Bar
}}

Помилка Lua: bad argument #1 to 'len' (string expected, got nil).