cards
1 TopicDeneb: Multi-layer card
Hi everyone, I am still learning the basics and exploring the world of Deneb vega-lite. 🙂 I am currently trying to figure out how to freely position text and DAX measures in a Deneb chart. Example: I like to position a DAX measure, e.g. Diameter Mean and a text label "Mean". Not sure if I approach this correctly, but I have set up a chart with 10 points in position "Y": 10....1 and "X": ... and I like to position and print the Diameter Mean value at position Y: 10, X: 0 and just beneth it I like to add a text block "Diameter Mean" and the hide the axis scale and points. { "data": { "values": [ {"A": "0", "B": 10}, {"A": "0", "B": 9}, {"A": "0", "B": 8}, {"A": "0", "B": 7}, {"A": "0", "B": 6}, {"A": "0", "B": 5}, {"A": "0", "B": 4}, {"A": "0", "B": 3}, {"A": "0", "B": 2}, {"A": "0", "B": 1} ] }, "title": "Information", "autosize": "fit", "background": "lightblue", "width": 150, "height": 400, "padding": { "left": 10, "right": 15, "top": 10, "bottom": "10" }, "encoding": { "x": { "field": "A", "type": "quantitative", "scale": {"domain": [0, 1]}, "axis": true }, "y": {"axis": true} }, "layer": [ { "mark": {"type": "point"}, "encoding": { "y": { "field": "B", "type": "quantitative" } } }, { "mark": { "type": "text", "dx": 20, "dy": 0, "xOffset": 0, "yOffset": 0, "angle": 0, "align": "left", "baseline": "bottom", "font": "sans-serif", "fontSize": 16, "fontStyle": "normal", "fontWeight": "normal", "limit": 0 }, "encoding": { "x": { "field": 0, "type": "quantitative" }, "y": { "field": 10, "type": "quantitative" } } } ] } Any tips on how I should continue or if you could point me to some similar examples for multi-layer cards would be highly appreciated. Thanks!Solved6.6KViews0likes6Comments