• Home
  • Random
  • Log in
  • Settings
  • About Azupedia
  • Disclaimers
Azupedia

Template:ChartColors

  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]
この記事は、クリエイティブ・コモンズ・表示・継承ライセンス3.0のもとで公表されたウィキペディアの項目Template:ChartColorsを素材として二次利用しています。
Lua error in Module:Itemnumber at line 91: attempt to concatenate local 'qid' (a nil value).
Lua logoLuaModuleを使用しています:
  • Module:ChartColors

This template displays standard color palettes: Category20 and Plotter. These color palettes can be used for statistical diagrams.

To translate or review the translation of the module to your language, edit carefully Data:I18n/ChartColors.tab.

Contents

  • 1 Syntax
  • 2 Template data
  • 3 Examples
  • 4 See also

Syntax

{{ChartColors|color palette|number of colors|show the color number}}

Full color of diagram palettes. Moving the mouse cursor over each box the color number appears.

Palette Code Resulting colors Note
Category20
(When n > 10)
{{ChartColors|Categ20|20}}                                                                                 Normal order
{{ChartColors|Categ20_3|20}}                                                                                 The first color is the 3rd
{{ChartColors|Categ20_i_3|20}}                                                                                 Inverted order
Category10
(Categ20 in the code.
When n < 11)
{{ChartColors|Categ20|10}}                                         Normal order
(1st, 3rd, 5th, ... of Category20)
{{ChartColors|Categ20_2|10}}                                         The first color is the 2nd
(of Category20)
{{ChartColors|Categ20_3|10}}                                         The first color is the 3rd
(of Category20)
{{ChartColors|Categ20_i|10}}                                         Inverted order
Plotter {{ChartColors|Plotter|26}}                                                                                                         Normal order
{{ChartColors|Plotter_i|26}}                                                                                                         Inverted order

The number of colors must be from 1 to 20 (Categ20) or 26 (Plotter).

Show the color number is an optional parameter, with two values: '-' the color number and 'a' with the degree of transparency (alpha channel) added at the end of the number and always it will be 'ff'. It is only interesting to add the color for the map coloring.

Template data

  1. 転送 Template:TemplateData header

Show colors of two standard palettes

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Palette name1

Name of the palette to use

Linerequired
Number of colors2

The number of colors to show on the palette, from 1 to 20 (Categ20) or 26 (Plotter)

Numberrequired
Show color number3

Write the color number after the box: - (only number) or (with alpha channel)

Numberoptional

Examples

Code Result
{{ChartColors|Categ20|10}}                                        
{{ChartColors|Categ20|20}}                                                                                
{{ChartColors|Plotter|20}}                                                                                
{{ChartColors|Categ20|3|-}}     #1f77b4       #ff7f0e       #2ca02c  

See also

  • {{BrewerColors}}
  • {{ChartColorLegends}}
The above documentation is transcluded from Template:ChartColors/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://wiki.tiffa.net/w/index.php?title=Template:ChartColors&oldid=606"
Last edited on 30 January 2021, at 19:03

Languages

      This page is not available in other languages.

      Azupedia
      • This page was last edited on 30 January 2021, at 19:03.
      • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
      • Privacy policy
      • About Azupedia
      • Disclaimers
      • Desktop