Template:ChartColorLegends/doc

This template shows standard color templates: Category20 and Plotter, and the code to include with legend.

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

Syntax


The color number must be 1 to 20 (Categ20) or 1 to 26 (Plotter).

Template data
{       "description": "Display a standard palette", "params": { "1": {                       "label": "Palette name", "description": "Name of the color palette to use (Categ20 or Plotter)", "type": "line", "required": true },               "2": {                        "label": "Color number", "description": "Color number required from 1 to 20", "type": "number", "required": true },               "3": {                        "label": "Column width", "description": "Width of columns showing colors (and text). Leave blank for no columns", "type": "string", "required": true },               "4": {                        "label": "Legend 1", "description": "Text for the 1st color", "type": "line", "required": false },               "5": {                        "label": "Legend 2", "description": "Text for the 2nd color", "type": "line", "required": false },               "6": {                        "label": "Legend 3", "description": "Text for the 3rd color", "type": "line", "required": false },               "7": {                        "label": "Legend 4", "description": "Text for the 4th color", "type": "line", "required": false },               "8": {                        "label": "Legend 5", "description": "Text for the 5th color", "type": "line", "required": false },               "9": {                        "label": "Legend 6", "description": "Text for the 6th color", "type": "line", "required": false },               "10": {                        "label": "Legend 7", "description": "Text for the 7th color", "type": "line", "required": false },               "11": {                        "label": "Legend 8", "description": "Text for the 8th color", "type": "line", "required": false },               "12": {                        "label": "Legend 9", "description": "Text for the 9th color", "type": "line", "required": false },               "13": {                        "label": "Legend 10", "description": "Text for the 10th color", "type": "line", "required": false },               "14": {                        "label": "Legend 11", "description": "Text for the 11th color", "type": "line", "required": false },               "15": {                        "label": "Legend 12", "description": "Text for the 12th color", "type": "line", "required": false },               "16": {                        "label": "Legend 13", "description": "Text for the 13th color", "type": "line", "required": false },               "17": {                        "label": "Legend 14", "description": "Text for the 14th color", "type": "line", "required": false },               "18": {                        "label": "Legend 15", "description": "Text for the 15th color", "type": "line", "required": false },               "19": {                        "label": "Legend 16", "description": "Text for the 16th color", "type": "line", "required": false },               "20": {                        "label": "Legend 17", "description": "Text for the 17th color", "type": "line", "required": false },               "21": {                        "label": "Legend 18", "description": "Text for the 18th color", "type": "line", "required": false },               "22": {                        "label": "Legend 19", "description": "Text for the 19th color", "type": "line", "required": false },               "23": {                        "label": "Legend 20", "description": "Text for the 20th color", "type": "line", "required": false }       } }

With legend text
produces:

Without legend text
produces: