# வார்ப்புரு:Medical cases chart/doc



## Description

This template should be used for all outbreak, epidemic and pandemic medical cases charts based on to maintain consistency. It displays horizontal bars for up to 5 different classifications of cases for each valid date. It also offers two columns to make numbers explicit and to show relative or absolute changes. It is designed to be flexible, but still standardizes some parts of the chart. This template should be transcluded in other templates, **NOT** in article pages. Please do not use templates other than and, maybe, to get away with a custom formatting. Suggest features in the talk page or code it yourself if it's not controversial.  

## Usage

Medical cases chart  
|barwidth of the stacked bars area'' (thin|medium|wide) [optional, defaults to: medium]  
|nummax width of the numbers in the columns'' (xx or xxxx)<-(n|t|m|w|d) [optional, defaults to: mm,  
see Rows' explanation and examples]  
|float = *on what side of the page should the chart be located* [optional, defaults to: ]  

|pretitle = *text at the beginning of the title* [optional]  
|disease = *name of the disease*  
|location = *location of the outbreak the chart is showing*  
|location2 = *broader location such as state/province or country* [optional]  
|location3 = *broadest location such as country* [optional]  
|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]  

|divisor = *manual override of the scaling divisor of the bars* [optional, defaults to: auto]  
|collapsible= *whether the rows are collapsible* (yes|y|1) [optional] {WIP}  
|data = *data lines for each valid date (see Data's and Rows' syntax)*  

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

### Data

The <code>data</code> parameter should be populated by a sequence of lines with a format similar to the rows'. The difference is that the parameter separator is the semicolon, <code>;</code>, and that repetitive parameters, like <code>divisor</code>, <code>numwidth</code> and <code>collapsible</code>, may be written only once in the body of . See examples.  

### Rows

The <code>rows</code> parameter should be populated by a sequence of . 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 not applicable (n.a.)* (yes|y|1)  

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

|divisor = *scaling divisor of the bars (bigger value = narrower bars)* [defaults to: 1]  
|nummax width of the numbers in the 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 <code>collapsed</code> and <code>id</code> will have no effect if <code>collapsible</code> 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 <code>alttot1</code>. The same applies to the *expression for total in 5th classification* and <code>alttot2</code>. The changes in the first and second columns are automatically wrapped in brackets. The <code>divisor</code> should be the same for all rows that can be visible at the same time. <code>numwidth</code> is a sequence of the initials of , thin, medium, wide and default and it determines the maximum width of each number in the data columns. Therefore, one should be chosen that minimizes the total width, but which doesn't make the numbers break/wrap on mobile view. Using xx or xxxx allocates one or two data columns, respectively.  

## Examples

<pre>  

</pre>  

<pre>  

</pre>  

### Applied example

<includeonly>  

</includeonly>