Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vega: Handle no height/width with autosize=none (#16696)
This works around the issue described in vega/vega#1146 With this patch, users will be able to set autosize=none, while at the same time rely on Kibana to set width/height. This will only be done when width & height are not set. Testing code: ```hjson { $schema: https://vega.github.io/schema/vega/v3.0.json autosize: none padding: {left: 32, bottom: 24, top: 10, right: 6} background: "#dbb" scales: [ { name: x type: band range: width domain: ["a", "b"] paddingOuter: 0.05 paddingInner: 0.95 } { name: y type: linear range: height domain: [0, 100] } ] data: [ { name: edges values: [ {x1: "a", x2: "b", y1: 50, y2: 50, value: 100} ] transform: [ { type: linkpath orient: horizontal shape: {signal: "'diagonal'"} sourceY: {expr: "scale('y', datum.y1)"} sourceX: {expr: "scale('x', datum.x1) + bandwidth('x')"} targetY: {expr: "scale('y', datum.y2)"} targetX: {expr: "scale('x', datum.x2)"} } { type: formula expr: range('y')[0]-scale('y', datum.value) as: strokeWidth } ] } ] axes: [ {orient: "bottom", scale: "x", zindex: 1} {orient: "left", scale: "y", zindex: 1} ] marks: [ { type: path name: edgeMark from: {data: "edges"} encode: { update: { strokeWidth: {field: "strokeWidth"} path: {field: "path"} } } } ] } ```
- Loading branch information