{ "$schema": "https://vega.github.io/schema/vega/v5.json", "data": [{"name": "dataset"}], "padding": 5, "width": {"signal": "pbiContainerWidth - 25"}, "height": {"signal": "pbiContainerHeight - 27"}, "scales": [ { "name": "x", "type": "point", "domain": {"data": "dataset", "field": "Date"}, "range": "width" }, { "name": "y", "type": "linear", "domain": {"data": "dataset", "field": "Value"}, "range": "height", "nice": true, "zero": true }, { "name": "color", "type": "ordinal", "domain": {"data": "dataset", "field": "Series"}, "range": {"scheme": "pbiColorNominal"} } ], "axes": [ {"orient": "bottom", "scale": "x"}, {"orient": "left", "scale": "y"} ], "legends": [ {"stroke": "color", "orient": "top", "direction": "horizontal"} ], "marks": [ { "type": "group", "from": { "facet": { "name": "series", "data": "dataset", "groupby": "Series" } }, "marks": [ { "type": "line", "from": {"data": "series"}, "encode": { "enter": { "x": {"scale": "x", "field": "Date"}, "y": {"scale": "y", "field": "Value"}, "stroke": {"scale": "color", "field": "Series"}, "strokeWidth": {"value": 2} }, "update": { "interpolate": {"value": "monotone"}, "strokeOpacity": {"value": 1} }, "hover": { "strokeOpacity": {"value": 0.5} } } } ] } ] }