{ "background": "transparent", "padding": 40, "width": "container", "height": "container", "autosize": { "type": "fit", "contains": "padding" }, "transform": [ { "window": [ { "op": "sum", "field": "weight", "as": "NbDocsParAnnnées" } ], "groupby": [ "source" ], "frame": [ null, null ] } ], "layer": [ { "mark": { "type": "line", "point": true }, "encoding": { "x": { "field": "source", "type": "nominal", "axis": { "labelAngle": 0, "labelOverlap": true }, "title": "Années", "sort": "x" }, "y": { "field": "weight", "type": "quantitative", "axis": { "labelAngle": 0 }, "scale": { "type": "linear" }, "title": "Nombre de documents" }, "color": { "field": "target", "title": "Voie d'accès", "scale": { "domain": [ "Diamond", "Gold", "Green", "Bronze", "Hybrid", "Closed" ], "range": [ "#00bfff", "#f9bc01", "#228B22", "#c97522", "#ffff67", "#7f7f7f" ] }, "type": "nominal" }, "data": { "name": "values" }, "tooltip": [ { "field": "NbDocsParAnnnées", "title": "N Docs de l'année", "type": "quantitative" }, { "field": "target", "type": "nominal", "title": "Voie d'accès" }, { "field": "weight", "type": "quantitative", "title": "Nb Docs Année / Statut OA" } ], "mark": { "type": "text", "color": "darkblue", "fontSize": 10, "fontWeight": "bold", "baseline": "bottom", "align": "center", "sort": "target", "dx": 0, "dy": -5 }, "encoding": { "x": { "field": "source", "type": "nominal", "title": "", "sort": "x" }, "y": { "bar": { "field": "weight", "type": "quantitative" }, "line": { "field": "target", "type": "quantitative" } }, "width": 600, "height": 300 } } } ] }