Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hola
Tengo el siguiente visual en Vega-Lite.
Mi resultado deseado es:
Pero estoy luchando para agregar la marca de regla para las líneas verticales entre los 2 puntos: he intentado numerosas formas y no puedo hacer que se muestre como arriba. Supongo que está definiendo las propiedades y e y2, pero estaba luchando para hacer esto debido a las transformaciones existentes en mi código, que está a continuación. Cualquier ayuda apreciada.
{
"width": {"step": 45},
"data": {"name": "dataset"},
"codificación": {
"y": {
"field": "Opciones",
"title": null,
"sort": {"field": "DiscIndex"},
"cuadrícula": verdadero
},
"x": {
"field": "Índice",
"title": null,
"axis": {"orient": "top"}
}
},
"resolver": {
"y": {"scale": "independent"}
},
"capa": [
{
"marca": {
"tipo": "rect",
"trazo": "#FAF9F6",
"strokeWidth": 1
},
"codificación": {
"color": {
"field": "Opciones",
"escala": {
"dominio": [
">= 220",
"201-219",
"181-200",
"161-180",
"141-160",
"121-140",
"111-120",
"101-110",
"91-100",
"81-90",
"71-80",
"61-70",
"51-60",
"<= 50"
],
"rango": [
"#F69781",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFF2AC",
"#FCC98A",
"#F69781",
"#F69781",
"#F69781",
"#F69781",
"#F69781"
]
},
"leyenda": null
}
}
},
{
"marca": {
"tipo": "texto",
"información sobre herramientas": false,
"trazo": "transparente",
"fontSize": 12
},
"codificación": {
"texto": {
"field": "Marcador de posición",
"tipo": "cuantitativo"
},
"color": {
"field": "Opciones",
"escala": {
"dominio": [
">= 220",
"201-219",
"181-200",
"161-180",
"141-160",
"121-140",
"111-120",
"101-110",
"91-100",
"81-90",
"71-80",
"61-70",
"51-60",
"<= 50"
],
"rango": [
"#F69781",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFFFFF",
"#FFF2AC",
"#FCC98A",
"#F69781",
"#F69781",
"#F69781",
"#F69781",
"#F69781"
]
}
}
}
},
{
"marca": {
"tipo": "línea",
"punto": verdadero
},
"codificación": {
"x": {
"field": "Índice",
"title": null,
"axis": {"orient": "top"}
},
"y": {
"field": "Opciones",
"title": null,
"sort": {"field": "DiscIndex"}
},
"color": {"value": "#0066CC"}
},
"transformar": [
{
"filter": "datum['Options'] === datum['BinnedSBPOptions']"
}
]
},
{
"marca": {
"tipo": "texto",
"fontSize": 14,
"yOffset": -15,
"línea base": "medio"
},
"codificación": {
"texto": {
"campo": "SBP",
"tipo": "cuantitativo"
},
"x": {
"field": "Índice",
"title": null,
"axis": {"orient": "top"}
},
"y": {
"field": "Opciones",
"title": null
},
"color": {"value": "black"},
"opacidad": {
"condición": {
"test": "datum['Options'] === datum['BinnedSBPOptions']",
"valor": 1
},
"valor": 0
}
}
},
{
"marca": {
"tipo": "línea",
"punto": verdadero
},
"codificación": {
"x": {
"field": "Índice",
"title": null,
"axis": {"orient": "top"}
},
"y": {
"field": "Opciones",
"title": null,
"sort": {"field": "DiscIndex"}
},
"color": {"value": "red"}
},
"transformar": [
{
"filter": "datum['Options'] === datum['BinnedDBPOptions']"
}
]
}
]
}
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.