الگو:گاه‌شمار افقی ساده

از wikirose
نسخهٔ تاریخ ‏۲۹ ژوئیهٔ ۲۰۲۲، ساعت ۰۲:۴۴ توسط Rayatpor (بحث | مشارکت‌ها) (۱ نسخه واردشده)
(تفاوت) → نسخهٔ قدیمی‌تر | نمایش نسخهٔ فعلی (تفاوت) | نسخهٔ جدیدتر ← (تفاوت)

خطای اسکریپتی: پودمان «Horizontal timeline» وجود ندارد.

توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

This is a Lua implementation of {{Horizontal timeline}}. It has all the functionality of the legacy one with few more features addd to it.

Parameters

Basic Plot settings

  • |bordr= Border of the plot
  • |bgCol= Baground color of the plot
  • |wdth= Width of the timeline plot. Defaults to 100%, can be in px or em too
  • |caption= shows a centered text. Can be used to show legends. Intended to be used to label the axis
  • |from= and |to= Necessary parameters which denotes the start and end of the timeline axis. The entire timeline (for the entire plot) including other type of rows are drawn to this scale. |to= may or maynot be greater than |from=. (see |inc= for more on this) If any bars described using parameters shown below lie outside these values, they will be trimmed or eliminated depending on their position.
  • |inc= Optional Increment to be added to |from= to reach |to= and be displayed along the axis. If not specified it will be automatically calculated. If |to= is greater than |from= then |inc= should be positive and vice versa. If not the outcome is undetermined.

The rowالگو:Sub parameter

|rowالگو:Sub= specifies how horizontal rows are drawn. You can have as many rows as you want. Subscript are positive intigers. They specify where the row is rendered on the plot. Lower subscript indicate higher on the plot. That is |row3= will be above |row4=

Three differenct types of rows are possible. They are:

  • scale: Specifies where the axis is drawn. (how it is drawn can be found in the Scale Row section below).
  • timeline: Specifies where and how the bars are drawn.
  • note: Row that contains arrow marked notes to give explanations to the graph.

Generic Parameters

  • |height= Applies height of timeline and note rows.

Each of these types of rows have their own attributes specified with an hyphen. For example, the style of a rowالگو:Sub can be specified as |rowالگو:Sub-style=. Full list of available attributes and their description can be found below.

Scale Row

  • |axis-negativeFmt=, |axis-positiveFmt= and |axis-zeroFmt= Formatting options for Axis scale.
  • |axis-nudge= Amount of nudge to be applied to the axis label, defaults to -1.8em.

Example Usage

الگو:Markup

الگو:Markup

Timeline Row

Note: colour or color both are acceptable variations for the whole module.
Note on Subscripts:
  • |rowالگو:Sub-i-<attribute>= denotes the attribute value for iالگو:Sup bar on the nالگو:Sup row.
  • Here subscript n is a positive number used to group rows and their attributed. They may not be continious. But are displayed in ascending order.
  • Subscript i is same as n but is used to group bar on a specific row.

Style Parameter of the Timeline Row

  • |rowالگو:Sub-style= and |rowالگو:Sub-i-style= can be used to provide row specific or bar specific styles. Those styles which repeat for every bar or for every row may be grouped into styles and be applied globally. The style prefixes can be anything other than row. See example below on how |styleDefault= is used to apply style common to all rows and |stylePopes=/|styleAntiPopes= are used to specify bar specific styles.

Example Usage

Note Row

  • |rowالگو:Sub-i-at= Necessary parameter. Specifies where the note is placed
  • |rowالگو:Sub-i-text= Specifies the content of the note
  • |rowالگو:Sub-i-shift= and |rowالگو:Sub-i-lift= Specifies the nudge applied to the note. Defaults to 0em
  • |rowالگو:Sub-i-arrow= Specifies the arrow Character. Defaults to

Example Usage

الگو:Markup

Note: |row1-5-lift= is missing. Same as n, i does not have to be continious.

Usage Tips

Examples

Known Issues

  • Left and bottom border for bars (not rows) will not render properly in old browsers which lacks support for CSS3 Box-sizing.(Refer here for full supported browser list) All mordern browsers provides at-least minimal support for this. Also only in extereme circumstances you will need to set bar border. Most of the time row border will be sufficient. Hence this should not be a problem.

See also