Skabelon:ChartColors
Denne skabelon bruger Lua: |
Teksten nedenfor er fra engelsk Wikipedia:
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.
Syntax redigér
{{ChartColors|color palette|number of colors|show the color number}}
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 redigér
ChartColors
Show colors of two standard palettes
Parameter | Beskrivelse | Type | Status | |
---|---|---|---|---|
Palette name | 1 | Name of the palette to use | Linje | påkrævet |
Number of colors | 2 | The number of colors to show on the palette, from 1 to 20 (Categ20) or 26 (Plotter) | Tal | påkrævet |
Show color number | 3 | Write the color number after the box: - (only number) or (with alpha channel) | Tal | valgfri |
Eksempler redigér
Kode | Resultat |
---|---|
{{ChartColors|Categ20|10}} |
|
{{ChartColors|Categ20|20}} |
|
{{ChartColors|Plotter|20}} |
|
{{ChartColors|Categ20|3|-}} |
#1f77b4 #ff7f0e #2ca02c |
See also redigér
- {{BrewerColors}}
- {{ChartColorLegends}}
Dokumentationen ovenfor er transkluderet fra Skabelon:ChartColors/doc. (redigér | historik) Brugere kan eksperimentere i denne skabelons undersider sandkasse (opret | kopiér) og testcases (opret). Tilføj venligst kategorier til /dok-undersiden. Undersider til denne skabelon. |