- Inicio
- Recursos
- Galería Deneb
- Radar de perfil por categoría
Radar de perfil por categoría
¿En qué destaca cada categoría y dónde se queda por debajo? Cada panel es el perfil de una categoría sobre cinco indicadores, con la media de todas en gris detrás. En Contoso 2024, Electronics gana en venta y ticket medio, y Music, Movies and Media en margen y en número de clientes.
💡 Cuándo usarlo
Cuando comparas pocos elementos (de 2 a 8) en varias medidas que no comparten unidad: venta, margen, ticket, clientes, crecimiento. Cada eje se escala a la mejor, así que muestra el perfil relativo, no el tamaño absoluto: el valor real va en la etiqueta. Con más de 8 ejes o elementos, una tabla con barras de datos se lee mejor.
Vista previa en vivo
Render con datos de muestra · Vega/Vega-Lite🖱️ Interactivo — haz clic o arrastra sobre las marcas y el gráfico responde aquí mismo.
Cargando vista previa… Vista previa renderizada con el runtime de Deneb · MIT © Daniel Marsh-Patrick
¿Te aviso cuando salga un visual nuevo?
Opcional: la descarga no lo necesita. Un correo cada dos semanas como mucho. Y si quieres todos los visuales de pago, está el Pase Deneb.
🧩 Campos que espera
-
__0__CategoryName texto -
__1__Total Sales número medida -
__2__Margin % número medida -
__3__Average Order Value número medida -
__4__Distinct Customers número medida -
__5__Sales YoY % número medida
Arrastra tus campos a Values en este orden.
🎯 Técnica
- Motor
- Vega 5.30.0
- Transforms
- aggregate agregación, filter filtro, fold pivoteo (fold), formula fórmula calculada, joinaggregate agregación por grupo, lookup, window ventana (acumulados/ranking)
- Parámetros
-
-
UI_Metrics: las medidas que forman los ejes del radar y el orden en que se dibujan se cambia en el spec · por defecto __1__, __2__, __3__, __4__, __5__
Y 16 señales internas de cálculo y diseño.
-
- Power BI
-
-
pbiContainerHeight: alto del recuadro del visual, para que el gráfico se ajuste -
pbiContainerWidth: ancho del recuadro del visual, para que el gráfico se ajuste -
pbiCrossFilterApply: filtra el resto del informe con lo que se pulsa -
pbiCrossFilterClear: quita el filtro cruzado del resto del informe -
pbiFormatAutoUnit: abrevia un número grande con su unidad (K, M…), como hace Power BI
-
🛠️ Cómo está hecho
Vega puro: fold pasa las cinco medidas a filas y joinaggregate escala cada eje entre 0 y la mejor categoría. Cada categoría es un grupo con su polígono (line cerrada), la media en gris discontinuo y su punto lleno donde es la mejor. La etiqueta de cada eje lleva el valor ya formateado por Power BI. Los paneles se reparten en 2 columnas hasta 4 categorías. Un clic en un vértice filtra el informe por esa categoría y atenúa las demás. El visual del paquete filtra el año 2024; la vista previa muestra ese año de Contoso Retail.
Cómo usarlo en Power BI
- Agrega el visual Deneb a tu reporte e ingresa a su editor.
- Arrastra tus campos a Values en este orden: CategoryName , Total Sales , Margin % , Average Order Value , Distinct Customers , Sales YoY % .
- Pega el spec (botón «Copiar spec» arriba) en el editor JSON de Deneb.
- Mapea tus columnas y ajusta a tu gusto. La interactividad nativa ya viene configurada.
Ver el spec Vega completo
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "Radar en paneles: un perfil por categoría sobre cinco indicadores, cada eje escalado al mejor de todas, con la media en gris discontinuo detrás. Responde en qué destaca cada categoría y dónde se queda por debajo de las demás. Por CSalcedoDataBI · https://csalcedodatabi.com/deneb/radar-perfil-categorias",
"usermeta": {
"deneb": {
"build": "1.9.0",
"metaVersion": 1,
"provider": "vega",
"providerVersion": "5.30.0"
},
"interactivity": {
"tooltip": true,
"contextMenu": true,
"selection": true,
"highlight": false,
"dataPointLimit": 50,
"selectionMode": "advanced"
},
"information": {
"uuid": "ded0d7d2-5bc5-454c-b2d3-498eb7ee495e",
"generated": "2026-12-01T06:47:06.958Z",
"name": "Radar de perfil por categoría",
"description": "Category Profile Radar. Pure Vega, no custom DAX. Ficha y vista previa en vivo: https://csalcedodatabi.com/deneb/radar-perfil-categorias. Autor: Cristobal Salcedo Beltrán.",
"author": "Cristobal Salcedo Beltrán"
},
"dataset": [
{
"key": "__0__",
"name": "CategoryName",
"description": "Un panel por valor (categoría, tienda, vendedor…). Lo ideal: de 2 a 8.",
"type": "text",
"kind": "column"
},
{
"key": "__1__",
"name": "Total Sales",
"description": "Primer eje (arriba).",
"type": "numeric",
"kind": "measure"
},
{
"key": "__2__",
"name": "Margin %",
"description": "Segundo eje.",
"type": "numeric",
"kind": "measure"
},
{
"key": "__3__",
"name": "Average Order Value",
"description": "Tercer eje.",
"type": "numeric",
"kind": "measure"
},
{
"key": "__4__",
"name": "Distinct Customers",
"description": "Cuarto eje.",
"type": "numeric",
"kind": "measure"
},
{
"key": "__5__",
"name": "Sales YoY %",
"description": "Quinto eje. Para cambiar los ejes, cambia las medidas y la lista `UI_Metrics`.",
"type": "numeric",
"kind": "measure"
}
]
},
"width": {
"signal": "pbiContainerWidth"
},
"height": {
"signal": "pbiContainerHeight"
},
"padding": 0,
"autosize": {
"type": "none",
"contains": "padding"
},
"config": {
"text": {
"font": "Segoe UI, Inter, -apple-system, Helvetica Neue, sans-serif"
}
},
"signals": [
{
"name": "UI_Metrics",
"value": [
"__1__",
"__2__",
"__3__",
"__4__",
"__5__"
],
"description": "The measures that form the radar axes, in drawing order (list -> array)."
},
{
"name": "LAYOUT_FooterHeight",
"description": "Height of the bottom row with the reading note, in px.",
"value": 18
},
{
"name": "LAYOUT_TitleHeight",
"description": "Height of each panel title (category and its strengths), in px.",
"value": 40
},
{
"name": "DATA_CategoryCount",
"description": "Number of categories: one radar panel each.",
"update": "data('catCount').length ? max(1, data('catCount')[0].n) : 1"
},
{
"name": "LAYOUT_GridColumns",
"description": "Columns of the panel grid for the category count: 2 up to 4 categories, 3 up to 6, then 4.",
"update": "DATA_CategoryCount <= 2 ? DATA_CategoryCount : (DATA_CategoryCount <= 4 ? 2 : (DATA_CategoryCount <= 6 ? 3 : 4))"
},
{
"name": "LAYOUT_GridRadius",
"description": "Radius a radar would get in the panel grid; under 60 px the visual overlays every category in one radar.",
"update": "min(width / LAYOUT_GridColumns - 230, (height - LAYOUT_FooterHeight) / ceil(DATA_CategoryCount / LAYOUT_GridColumns) - LAYOUT_TitleHeight - 84) / 2"
},
{
"name": "LAYOUT_Overlay",
"description": "True when the panels would be too small: every category is drawn in one radar with a legend.",
"update": "LAYOUT_GridRadius < 60"
},
{
"name": "LAYOUT_Columns",
"description": "Columns actually used: 1 in overlay mode, else the grid columns.",
"update": "LAYOUT_Overlay ? 1 : LAYOUT_GridColumns"
},
{
"name": "LAYOUT_Rows",
"description": "Rows actually used by the panels.",
"update": "LAYOUT_Overlay ? 1 : ceil(DATA_CategoryCount / LAYOUT_Columns)"
},
{
"name": "LAYOUT_CellWidth",
"description": "Width of one panel.",
"update": "width / LAYOUT_Columns"
},
{
"name": "LAYOUT_CellHeight",
"description": "Height of one panel.",
"update": "(height - LAYOUT_FooterHeight) / LAYOUT_Rows"
},
{
"name": "LAYOUT_LegendHeight",
"description": "Height of the category legend in overlay mode on a narrow visual; 0 otherwise.",
"update": "LAYOUT_Overlay && width < 560 ? DATA_CategoryCount * 20 + 10 : 0"
},
{
"name": "LAYOUT_Radius",
"description": "Radius of each radar, in px.",
"update": "LAYOUT_Overlay ? max(20, min(width / 2 - 85, (height - LAYOUT_FooterHeight - LAYOUT_LegendHeight - 76) / 2)) : max(20, LAYOUT_GridRadius)"
},
{
"name": "DATA_MetricCount",
"description": "Number of axes: the length of UI_Metrics.",
"update": "length(UI_Metrics)"
},
{
"name": "STATE_HoverMetric",
"description": "Axis under the pointer: its vertices grow and its label goes bold in every panel.",
"value": null,
"on": [
{
"events": "@vertex:pointerover, @axisLabel:pointerover",
"update": "datum.metric"
},
{
"events": "@vertex:pointerout, @axisLabel:pointerout",
"update": "null"
}
]
},
{
"name": "STATE_AnySelected",
"description": "True when a click selected a category (Deneb __selected__): the other panels fade.",
"update": "length(data('selectedRows')) > 0"
},
{
"name": "STATE_CrossFilter",
"description": "Click on a vertex filters the report by that category; a click elsewhere clears it.",
"value": [],
"on": [
{
"events": {
"source": "scope",
"type": "mouseup",
"markname": "vertex"
},
"update": "pbiCrossFilterApply(event, \"datum['__0__'] == '\" + datum.Category + \"'\")"
},
{
"events": {
"source": "view",
"type": "mouseup",
"filter": [
"!event.item || event.item.mark.name != 'vertex'"
]
},
"update": "pbiCrossFilterClear()"
}
]
}
],
"data": [
{
"name": "dataset"
},
{
"name": "selectedRows",
"source": "dataset",
"transform": [
{
"type": "filter",
"expr": "datum.__selected__ === 'on'"
}
]
},
{
"name": "catCount",
"source": "dataset",
"transform": [
{
"type": "aggregate",
"ops": [
"distinct"
],
"fields": [
"__0__"
],
"as": [
"n"
]
}
]
},
{
"name": "long",
"source": "dataset",
"transform": [
{
"type": "formula",
"as": "Category",
"expr": "'' + datum['__0__']"
},
{
"type": "fold",
"fields": [
"__1__",
"__2__",
"__3__",
"__4__",
"__5__"
],
"as": [
"metric",
"raw"
]
},
{
"type": "formula",
"as": "v",
"expr": "toNumber(datum.raw)"
},
{
"type": "filter",
"expr": "isValid(datum.v) && isFinite(datum.v)"
},
{
"type": "formula",
"as": "idx",
"expr": "indexof(UI_Metrics, datum.metric)"
},
{
"type": "formula",
"as": "isPct",
"expr": "indexof(datum.metric, '%') >= 0"
},
{
"type": "formula",
"as": "label",
"expr": "isValid(datum[datum.metric + '__formatted']) ? datum[datum.metric + '__formatted'] : (datum.isPct ? format(datum.v, '.1%') : pbiFormatAutoUnit(datum.v, '#,0.0'))"
},
{
"type": "joinaggregate",
"groupby": [
"metric"
],
"ops": [
"max",
"min",
"mean"
],
"fields": [
"v",
"v",
"v"
],
"as": [
"vMax",
"vMin",
"vMean"
]
},
{
"type": "formula",
"as": "lo",
"expr": "min(0, datum.vMin)"
},
{
"type": "formula",
"as": "r",
"expr": "datum.vMax > datum.lo ? (datum.v - datum.lo) / (datum.vMax - datum.lo) : 0"
},
{
"type": "formula",
"as": "rMean",
"expr": "datum.vMax > datum.lo ? (datum.vMean - datum.lo) / (datum.vMax - datum.lo) : 0"
},
{
"type": "formula",
"as": "best",
"expr": "datum.v === datum.vMax"
},
{
"type": "formula",
"as": "angle",
"expr": "2 * PI * datum.idx / DATA_MetricCount - PI / 2"
},
{
"type": "collect",
"sort": {
"field": "idx"
}
}
]
},
{
"name": "cats",
"source": "long",
"transform": [
{
"type": "filter",
"expr": "datum.idx === 0"
},
{
"type": "window",
"sort": {
"field": "v",
"order": "descending"
},
"ops": [
"row_number"
],
"as": [
"pos"
]
}
]
},
{
"name": "strengths",
"source": "long",
"transform": [
{
"type": "filter",
"expr": "datum.best"
},
{
"type": "aggregate",
"groupby": [
"Category"
],
"ops": [
"values"
],
"fields": [
"metric"
],
"as": [
"items"
]
},
{
"type": "formula",
"as": "text",
"expr": "join(pluck(datum.items, 'metric'), ' · ')"
}
]
},
{
"name": "panels",
"source": "cats",
"transform": [
{
"type": "lookup",
"from": "strengths",
"key": "Category",
"fields": [
"Category"
],
"values": [
"text"
],
"as": [
"best"
],
"default": ""
}
]
},
{
"name": "spokes",
"source": "long",
"transform": [
{
"type": "aggregate",
"groupby": [
"metric",
"idx",
"angle"
]
},
{
"type": "formula",
"as": "ex",
"expr": "cos(datum.angle) * LAYOUT_Radius"
},
{
"type": "formula",
"as": "ey",
"expr": "sin(datum.angle) * LAYOUT_Radius"
},
{
"type": "formula",
"as": "lx",
"expr": "cos(datum.angle) * (LAYOUT_Radius + 12)"
},
{
"type": "formula",
"as": "ly",
"expr": "sin(datum.angle) * (LAYOUT_Radius + 12)"
},
{
"type": "formula",
"as": "align",
"expr": "abs(cos(datum.angle)) < 0.2 ? 'center' : (cos(datum.angle) > 0 ? 'left' : 'right')"
},
{
"type": "formula",
"as": "baseline",
"expr": "sin(datum.angle) < -0.5 ? 'bottom' : (sin(datum.angle) > 0.5 ? 'top' : 'middle')"
},
{
"type": "collect",
"sort": {
"field": "idx"
}
}
]
}
],
"scales": [
{
"name": "color",
"type": "ordinal",
"domain": {
"data": "cats",
"field": "Category",
"sort": {
"field": "pos",
"op": "min"
}
},
"range": [
"#0f6b5c",
"#c2410c",
"#2563a8",
"#7c3aed",
"#b7791f",
"#0e7490",
"#be185d",
"#4d7c0f"
]
}
],
"marks": [
{
"type": "group",
"name": "panel",
"from": {
"data": "panels"
},
"encode": {
"update": {
"x": {
"signal": "LAYOUT_Overlay ? 0 : ((datum.pos - 1) % LAYOUT_Columns) * LAYOUT_CellWidth"
},
"y": {
"signal": "LAYOUT_Overlay ? 0 : floor((datum.pos - 1) / LAYOUT_Columns) * LAYOUT_CellHeight"
},
"width": {
"signal": "LAYOUT_CellWidth"
},
"height": {
"signal": "LAYOUT_CellHeight"
}
}
},
"signals": [
{
"name": "LAYOUT_CenterX",
"description": "Horizontal centre of the radar inside its panel.",
"update": "LAYOUT_CellWidth / 2"
},
{
"name": "LAYOUT_CenterY",
"description": "Vertical centre of the radar inside its panel, below the panel title.",
"update": "LAYOUT_Overlay ? LAYOUT_LegendHeight + (LAYOUT_CellHeight - LAYOUT_LegendHeight) / 2 + 8 : LAYOUT_TitleHeight + 40 + (LAYOUT_CellHeight - LAYOUT_TitleHeight - 66) / 2"
},
{
"name": "INTERNAL_IsFirstPanel",
"description": "True for the first panel: in overlay mode only it draws the grid, the mean and the axis names.",
"update": "parent.pos === 1"
},
{
"name": "DATA_PanelCategory",
"description": "Category drawn by this panel.",
"update": "parent.Category"
},
{
"name": "STATE_PanelDimmed",
"description": "True when another category is selected: this panel fades.",
"update": "STATE_AnySelected && parent.__selected__ !== 'on'"
}
],
"data": [
{
"name": "mine",
"source": "long",
"transform": [
{
"type": "filter",
"expr": "datum.Category === DATA_PanelCategory"
}
]
}
],
"marks": [
{
"type": "text",
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "LAYOUT_CenterX"
},
"y": {
"value": 16
},
"align": {
"value": "center"
},
"text": {
"signal": "LAYOUT_Overlay ? '' : parent.Category"
},
"limit": {
"signal": "LAYOUT_CellWidth - 16"
},
"fontSize": {
"value": 13
},
"fontWeight": {
"value": 700
},
"fill": {
"signal": "scale('color', parent.Category)"
}
}
}
},
{
"type": "text",
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "LAYOUT_CenterX"
},
"y": {
"value": 32
},
"align": {
"value": "center"
},
"text": {
"signal": "LAYOUT_Overlay ? '' : (parent.best ? 'La mejor en: ' + parent.best : 'No es la mejor en ningún eje')"
},
"limit": {
"signal": "LAYOUT_CellWidth - 16"
},
"fontSize": {
"value": 10.5
},
"fill": {
"value": "#5b6672"
}
}
}
},
{
"type": "group",
"encode": {
"update": {
"x": {
"signal": "LAYOUT_CenterX"
},
"y": {
"signal": "LAYOUT_CenterY"
}
}
},
"marks": [
{
"type": "line",
"from": {
"data": "spokes"
},
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "datum.ex * 0.25"
},
"y": {
"signal": "datum.ey * 0.25"
},
"interpolate": {
"value": "linear-closed"
},
"stroke": {
"value": "#d5d9de"
},
"strokeOpacity": {
"signal": "!LAYOUT_Overlay || INTERNAL_IsFirstPanel ? 1 : 0"
},
"strokeWidth": {
"value": 0.8
}
}
}
},
{
"type": "line",
"from": {
"data": "spokes"
},
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "datum.ex * 0.5"
},
"y": {
"signal": "datum.ey * 0.5"
},
"interpolate": {
"value": "linear-closed"
},
"stroke": {
"value": "#d5d9de"
},
"strokeOpacity": {
"signal": "!LAYOUT_Overlay || INTERNAL_IsFirstPanel ? 1 : 0"
},
"strokeWidth": {
"value": 0.8
}
}
}
},
{
"type": "line",
"from": {
"data": "spokes"
},
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "datum.ex * 0.75"
},
"y": {
"signal": "datum.ey * 0.75"
},
"interpolate": {
"value": "linear-closed"
},
"stroke": {
"value": "#d5d9de"
},
"strokeOpacity": {
"signal": "!LAYOUT_Overlay || INTERNAL_IsFirstPanel ? 1 : 0"
},
"strokeWidth": {
"value": 0.8
}
}
}
},
{
"type": "line",
"from": {
"data": "spokes"
},
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "datum.ex * 1"
},
"y": {
"signal": "datum.ey * 1"
},
"interpolate": {
"value": "linear-closed"
},
"stroke": {
"value": "#d5d9de"
},
"strokeOpacity": {
"signal": "!LAYOUT_Overlay || INTERNAL_IsFirstPanel ? 1 : 0"
},
"strokeWidth": {
"value": 1.2
}
}
}
},
{
"type": "rule",
"from": {
"data": "spokes"
},
"interactive": false,
"encode": {
"update": {
"x": {
"value": 0
},
"y": {
"value": 0
},
"x2": {
"field": "ex"
},
"y2": {
"field": "ey"
},
"stroke": {
"value": "#d5d9de"
},
"strokeOpacity": {
"signal": "!LAYOUT_Overlay || INTERNAL_IsFirstPanel ? 1 : 0"
},
"strokeWidth": {
"value": 0.8
}
}
}
},
{
"type": "line",
"from": {
"data": "mine"
},
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "cos(datum.angle) * datum.rMean * LAYOUT_Radius"
},
"y": {
"signal": "sin(datum.angle) * datum.rMean * LAYOUT_Radius"
},
"interpolate": {
"value": "linear-closed"
},
"stroke": {
"value": "#7b8590"
},
"strokeOpacity": {
"signal": "!LAYOUT_Overlay || INTERNAL_IsFirstPanel ? 1 : 0"
},
"strokeWidth": {
"value": 1.2
},
"strokeDash": {
"value": [
4,
3
]
}
}
}
},
{
"type": "line",
"name": "shape",
"from": {
"data": "mine"
},
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "cos(datum.angle) * datum.r * LAYOUT_Radius"
},
"y": {
"signal": "sin(datum.angle) * datum.r * LAYOUT_Radius"
},
"interpolate": {
"value": "linear-closed"
},
"fill": {
"signal": "scale('color', DATA_PanelCategory)"
},
"fillOpacity": {
"signal": "STATE_PanelDimmed ? 0.04 : (LAYOUT_Overlay ? 0.1 : 0.22)"
},
"stroke": {
"signal": "scale('color', DATA_PanelCategory)"
},
"strokeWidth": {
"value": 2
},
"strokeOpacity": {
"signal": "STATE_PanelDimmed ? 0.25 : 1"
}
}
}
},
{
"type": "symbol",
"name": "vertex",
"from": {
"data": "mine"
},
"encode": {
"update": {
"x": {
"signal": "cos(datum.angle) * datum.r * LAYOUT_Radius"
},
"y": {
"signal": "sin(datum.angle) * datum.r * LAYOUT_Radius"
},
"size": {
"signal": "STATE_HoverMetric === datum.metric ? 110 : (datum.best ? 60 : 34)"
},
"fill": {
"signal": "datum.best ? scale('color', DATA_PanelCategory) : '#ffffff'"
},
"stroke": {
"signal": "scale('color', DATA_PanelCategory)"
},
"strokeWidth": {
"value": 1.6
},
"cursor": {
"value": "pointer"
},
"tooltip": {
"signal": "{'title': datum.Category + ' · ' + datum.metric, 'Valor': datum.label, 'Frente a la mejor': format(datum.vMax ? datum.v / datum.vMax : 0, '.0%'), 'Brecha con la media (pp / %)': datum.isPct ? format((datum.v - datum.vMean) * 100, '+.1f') + ' pp' : (datum.vMean ? format(datum.v / datum.vMean - 1, '+.0%') : '—')}"
},
"opacity": {
"signal": "STATE_PanelDimmed ? 0.3 : 1"
}
}
}
},
{
"type": "text",
"name": "axisLabel",
"from": {
"data": "mine"
},
"encode": {
"update": {
"x": {
"signal": "cos(datum.angle) * (LAYOUT_Radius + 10)"
},
"y": {
"signal": "sin(datum.angle) * (LAYOUT_Radius + 10) + (sin(datum.angle) < -0.5 ? (LAYOUT_Overlay ? -18 : -30) : (sin(datum.angle) > 0.5 ? 2 : -6))"
},
"align": {
"signal": "abs(cos(datum.angle)) < 0.2 ? 'center' : (cos(datum.angle) > 0 ? 'left' : 'right')"
},
"baseline": {
"value": "top"
},
"text": {
"signal": "LAYOUT_Overlay ? (INTERNAL_IsFirstPanel ? datum.metric : '') : [datum.metric, datum.label]"
},
"lineHeight": {
"value": 13
},
"limit": {
"value": 130
},
"fontSize": {
"value": 10.5
},
"fontWeight": {
"signal": "STATE_HoverMetric === datum.metric ? 700 : 400"
},
"fill": {
"signal": "STATE_HoverMetric === datum.metric ? '#1f2933' : '#5b6672'"
}
}
}
}
]
}
]
},
{
"type": "symbol",
"from": {
"data": "cats"
},
"interactive": false,
"encode": {
"update": {
"x": {
"value": 12
},
"y": {
"signal": "16 + (datum.pos - 1) * 20"
},
"shape": {
"value": "circle"
},
"size": {
"value": 80
},
"fill": {
"scale": "color",
"field": "Category"
},
"opacity": {
"signal": "LAYOUT_Overlay ? 1 : 0"
}
}
}
},
{
"type": "text",
"from": {
"data": "cats"
},
"interactive": false,
"encode": {
"update": {
"x": {
"value": 22
},
"y": {
"signal": "16 + (datum.pos - 1) * 20"
},
"baseline": {
"value": "middle"
},
"text": {
"signal": "LAYOUT_Overlay ? datum.Category : ''"
},
"limit": {
"value": 170
},
"fontSize": {
"value": 11.5
},
"fontWeight": {
"value": 600
},
"fill": {
"scale": "color",
"field": "Category"
}
}
}
},
{
"type": "text",
"interactive": false,
"encode": {
"update": {
"x": {
"signal": "width - 6"
},
"y": {
"signal": "height - 6"
},
"align": {
"value": "right"
},
"text": {
"value": "Cada eje: 100 % = la mejor categoría · gris discontinuo = media"
},
"fontSize": {
"value": 10
},
"fill": {
"value": "#7b8590"
}
}
}
}
]
}