//
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Lines
 // Please do not modify it anywhere else, as it may get copied and override your changes.
 // Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:Lines
 //
 // Template translation is in https://commons.wikimedia.org/wiki/Data:Original/Template:Graphs.tab
 //

 "version": 2,
 "width": },
 "height": },
 Parameter to controls how width/height should be interpreted.
 See Vega 2.x "padding" https://vega.github.io/vega/docs/porting-guide/#layout
 and Vega x.x "autosize" https://vega.github.io/vega-lite/docs/size.html#autosize
 and CSS attribute "box-sizing" https://developer.mozilla.org/docs/Web/CSS/box-sizing
 for references
 -->
 "padding": "auto",
 "padding": "strict",
 under Vega 2 without "init" this signal does not work as expected with legend positioning
 specifically when using "rightwidth" without "init" for chart title positioning
 it causes extra blank space appearing at the left of chart plotting
 "init" description: https://vega.github.io/vega/docs/porting-guide/#:~:text=%22init%22
 -->
 "signals": [{"name": "rightwidth", "expr": "width + padding.right", "init":"}"}],
 "data": [{
 "name": "chart",
 "format": {"type": "json"
 , "property": "data"
 , "parse": {"}": "date"}
 "transform": [
 // chart data custom transforms
 // Optionally filter data with an template expression parameter
 // e.g. `filter = datum.some_dataset_field > 1900 && datum.some_dataset_field < 2000` where `some_dataset_field` means some valid field of displayed dataset
 // Convert xField parameter into a field "_xfield"
 , {"type": "sort", "by": ["_xfield"]}
 ]
 // source of labels for `tabletype=tab`
 "name": "labels",
 "url": "tabular:///}",
 "format": {"type": "json", "property": "fields"},
 "transform": [
 // labels custom transforms
 // Optionally filter labels with an template expression parameter
 // e.g. `filter = 'year' != datum.name`
 ]

 // Each vertical annotation is expected to be x-scale typed `x`, string `text`,
 // and optional string `color` (e.g. "#4d2800")
 "name": "vAnnotations",
 "format": {"type": "json", "property": "data"},
 "transform": [
 // in case of `type=year` convert year number to UNIX timestamp
 // in case of `type=time` convert date string to UNIX timestamp
 // expected item format `{"text": "...", "color": "#000", x: _ }`
 ]
 // Each horizontal annotation is expected to be numeric `y`, string `text`,
 // and optional string `color` (e.g. "#4d2800")
 "name": "hAnnotations",
 "format": {"type": "json", "property": "data"},
 "transform": [
 // expected item format `{"text": "...", "color": "#000", y: 0}`
 ]
 ],
 "scales": [
 "name": "x",
 "type": }
 "domain": {"data": "chart", "field": "_xfield"},
 "range": "width",
 "name": "y",
 "type": "}",
 "range": "height",
 "domain": {"data": "chart", "field": "_yfield"},
 "name": "color",
 "type": "ordinal",
 "range": }|[}|,|","}}"] |"}"}}, 
 "domain": {"data": "chart", "field": "}"}
 "name": "labels",
 "type": "ordinal",
 "range": {"data": "labels", "field": "title"},
 "range": [}],
 ],
 "legends": [{
 "fill": "color",
 "stroke": "color",
 "axes": [
 "scale": "x", "type": "x", "tickSizeEnd": 0,
 "properties": { 
 "labels": { 
 "scale": "y", "type": "y", "tickSizeEnd": 0,
 "properties": { 
 "labels": { 
 ],

 "marks": [
 // Group data by the group parameter or "key", and draw lines, one line per group
 "type": "group",
 "from": {
 "data": "chart",
 "transform": [{"type": "facet", "groupby": ["}"]}]
 "marks": [
 "type": "line",
 "properties": {
 "hover": {
 "stroke": {"value": "red"}
 "update": {
 "stroke": {"scale": "color", "field": "}"}
 "enter": {
 "y": {"scale": "y", "field": "_yfield"},
 "x": {"scale": "x", "field": "_xfield"},
 "stroke": {"scale": "color", "field": "}"},
 "interpolate": {"value": "}"},
 "strokeWidth": {"value": }}
 ,
 "type": "symbol",
 "properties": {
 "hover": {
 "fill": {"value": "red"}
 "update": {
 "fill": {"scale": "color", "field": "}"}
 "enter": {
 "y": {"scale": "y", "field": "_yfield"},
 "x": {"scale": "x", "field": "_xfield"},
 "size" : {"value": }},
 "fill": {"scale": "color", "field": "}"}
 ],

 // vertical annotations dashed line
 "type": "rule",
 "properties": {
 "update": {
 "x": {"scale": "x", "field": "x"},
 "y": {"value": 0},
 "y2": {"field": {"group": "height"} },
 "stroke": {"field": "color"},
 "opacity": {"value": 0.75},
 "strokeWidth": {"value": 1},
 "strokeDash": {"value": [6,1]}
 "from": {"data": "vAnnotations"}
 // vertical annotations text
 "type": "text",
 "properties": {
 "update": {
 "x": {"scale": "x", "field": "x"},
 "y": {"value": 0},
 "align": {"value": "right"},
 "dx": {"value": -3},
 "dy": {"value": 3},
 "baseline": {"value": "top"},
 "text": {"field": "text"},
 "angle": {"value": -90},
 "opacity": {"value": 0.75},
 "fill": {"field": "color"}
 "from": {"data": "vAnnotations"}
 // horizontal annotations dashed line
 "type": "rule",
 "properties": {
 "update": {
 "y": {"scale": "y", "field": "y"},
 "x": {"value": 0 },
 "x2": {"field": {"group": "width"} },
 "stroke": {"field": "color"},
 "opacity": {"value": 0.75},
 "strokeWidth": {"value": 1},
 "strokeDash": {"value": [6,1]}
 "from": {"data": "hAnnotations"}
 // horizontal annotations text
 "type": "text",
 "properties": {
 "update": {
 "y": {"scale": "y", "field": "y", "offset": 3},
 "x": {"value": 0, "offset": 3},
 "baseline": {"value": "top"},
 "text": {"field": "text"},
 "angle": {"value": 0},
 "opacity": {"value": 0.75},
 "fill": {"field": "color"}
 "from": {"data": "hAnnotations"}

 // Draw title at the top of the graph
 "type": "text",
 "properties": {
 "enter": {
 "y": {"value": -15},
 "x": {"value": } },
 "x2": {"signal": "width", "mult": 1.0, "offset": } },
 "xc": {"signal": "width", "mult": 0.5, "offset": } },
 "text": {"value": "}"},
 "fontWeight": {"value": "bold"},
 "align": {"value": "}"},
 "baseline": {"value": "bottom"},
 "fill": {"value": "#000"}
 ]
}}