Jump to content

Module:ChartColors/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
SporkBot (talk | contribs)
m Replace template per TFD outcome; no change in content
cleanup
Line 8: Line 8:
! Code !! Result
! Code !! Result
|-
|-
| <code><nowiki>{{#invoke:ChartColors|ShowColors|Categ20|5}}</nowiki></code> || {{#invoke:ChartColors|ShowColors|Categ20|5}}
| {{mlx|ChartColors|ShowColors|Categ20|5}} || {{#invoke:ChartColors|ShowColors|Categ20|5}}
|-
|-
| <code><nowiki>{{ChartColors|Categ20|9}}</nowiki></code> || {{ChartColors|Categ20|9}}
| {{tlx|ChartColors|Categ20|9}} || {{ChartColors|Categ20|9}}
|-
|-
| <code><nowiki>{{#invoke:ChartColors|ShowColors|Categ20|3|-}}</nowiki></code> || {{#invoke:ChartColors|ShowColors|Categ20|3|-}}
| {{mlx|ChartColors|ShowColors|Categ20|3|-}} || {{#invoke:ChartColors|ShowColors|Categ20|3|-}}
|-
|-
| <code><nowiki>{{#invoke:ChartColors|ShowColors|Categ20|3|a}}</nowiki></code> || {{#invoke:ChartColors|ShowColors|Categ20|3|a}}
| {{mlx|ChartColors|ShowColors|Categ20|3|a}} || {{#invoke:ChartColors|ShowColors|Categ20|3|a}}
|-
|-
| <code><nowiki>{{#invoke:ChartColors|ShowColors|Plotter|5}}</nowiki></code> || {{#invoke:ChartColors|ShowColors|Plotter|5}}
| {{mlx|ChartColors|ShowColors|Plotter|5}} || {{#invoke:ChartColors|ShowColors|Plotter|5}}
|-
|-
| <code><nowiki>{{ChartColors|Plotter|20}}</nowiki></code> || {{ChartColors|Plotter|20}}
| {{mlx|ChartColors|Plotter|20}} || {{ChartColors|Plotter|20}}
|-
|-
|}
|}


===Function Legends===
===Function Legends===
{{mlx|ChartColors|Legends|Categ20|5|2}}
<pre>
{{#invoke:ChartColors|Legends|Categ20|5|2}}
</pre>
produces:
produces:

{{#invoke:ChartColors|Legends|Categ20|5|2}}
{{#invoke:ChartColors|Legends|Categ20|5|2}}


{{mlx|ChartColors|Legends|Categ20|3|1|One|Two|Three}}

produces:
<pre>
{{#invoke:ChartColors|Legends|Categ20|3|1|One|Two|Three}}
{{#invoke:ChartColors|Legends|Categ20|3|1|One|Two|Three}}
</pre>
produces:


<includeonly>{{Sandbox other||
{{#invoke:ChartColors|Legends|Categ20|3|1|One|Two|Three}}
<includeonly>
[[Category:Modules for general use]]
[[Category:Modules for general use]]
</includeonly>
}}</includeonly>

Revision as of 09:14, 6 June 2024

Used by {{ChartColors}} and {{ChartColorLegends}}

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

Function ShowColors

Code Result
{{#invoke:ChartColors|ShowColors|Categ20|5}}                    
{{ChartColors|Categ20|9}}                                    
{{#invoke:ChartColors|ShowColors|Categ20|3|-}}     #1f77b4       #ff7f0e       #2ca02c  
{{#invoke:ChartColors|ShowColors|Categ20|3|a}}     #1f77b4ff       #ff7f0eff       #2ca02cff  
{{#invoke:ChartColors|ShowColors|Plotter|5}}                    
{{#invoke:ChartColors|Plotter|20}}                                                                                

Function Legends

{{#invoke:ChartColors|Legends|Categ20|5|2}} produces:

  • 1f77b4
  • ff7f0e
  • 2ca02c
  • d62728
  • 9467bd
  • {{div col|colwidth=2}}
     {{legend|#1f77b4|}}
     {{legend|#ff7f0e|}}
     {{legend|#2ca02c|}}
     {{legend|#d62728|}}
     {{legend|#9467bd|}}
    {{div col end}}
    

    {{#invoke:ChartColors|Legends|Categ20|3|1|One|Two|Three}} produces:

  • One
  • Two
  • Three
  • {{div col|colwidth=1}}
     {{legend|#1f77b4|One}}
     {{legend|#ff7f0e|Two}}
     {{legend|#2ca02c|Three}}
    {{div col end}}