{
  "version": "xarts.typed-tables/1",
  "family": "typed-tables",
  "provenance": {
    "legacyId": "table-as-chart"
  },
  "document": {
    "header": {
      "title": "Comparación de empresas ficticias",
      "subtitle": "Datos generados para demostrar la gramática del gráfico",
      "source": "Ejemplo sintético · sin datos de clientes"
    },
    "footer": {
      "source": "Ejemplo sintético generado para la biblioteca",
      "notes": "Valores y entidades ficticios. No representan clientes, planes ni resultados reales."
    },
    "spacing": {
      "horizontalPadding": 24,
      "topPadding": 22,
      "bottomPadding": 16,
      "minimumTextGap": 4
    }
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 860,
      "height": 400
    },
    "locale": "es-ES",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "output": {
    "filename": "table-as-chart",
    "embedSpec": true,
    "geometryDecimals": 2
  },
  "operation": "typed-cell-table",
  "data": {
    "columns": [
      {
        "key": "Company",
        "label": "Compañía",
        "align": "left",
        "missing": "reject",
        "cellType": "text"
      },
      {
        "key": "Revenue",
        "label": "Ingresos",
        "unit": "€M",
        "align": "right",
        "missing": "reject",
        "cellType": "number",
        "format": {
          "prefix": "",
          "suffix": "",
          "decimals": 0
        }
      },
      {
        "key": "EBITDA margin",
        "label": "Margen EBITDA",
        "unit": "%",
        "align": "right",
        "missing": "reject",
        "cellType": "bar",
        "format": {
          "prefix": "",
          "suffix": "%",
          "decimals": 1
        },
        "domain": {
          "source": "column-maximum"
        }
      },
      {
        "key": "Growth YoY",
        "label": "Crecimiento",
        "unit": "pp interanual",
        "align": "right",
        "missing": "reject",
        "cellType": "delta",
        "format": {
          "prefix": "",
          "suffix": "",
          "decimals": 1
        },
        "polarity": "higher-is-better"
      },
      {
        "key": "Digital maturity",
        "label": "Madurez digital",
        "unit": "0–100%",
        "align": "center",
        "missing": "reject",
        "cellType": "harvey",
        "maximum": 1,
        "quantization": {
          "kind": "nearest",
          "steps": 4
        }
      }
    ],
    "rows": [
      {
        "id": "company-1",
        "values": {
          "Company": "Empresa 1",
          "Revenue": 475,
          "EBITDA margin": 22.2,
          "Growth YoY": 9.8,
          "Digital maturity": 0.5
        }
      },
      {
        "id": "company-2",
        "values": {
          "Company": "Empresa 2",
          "Revenue": 675,
          "EBITDA margin": 18.3,
          "Growth YoY": -1.8,
          "Digital maturity": 1
        }
      },
      {
        "id": "company-3",
        "values": {
          "Company": "Empresa 3",
          "Revenue": 650,
          "EBITDA margin": 21.4,
          "Growth YoY": -0.3,
          "Digital maturity": 1
        }
      },
      {
        "id": "company-4",
        "values": {
          "Company": "Empresa 4",
          "Revenue": 275,
          "EBITDA margin": 17,
          "Growth YoY": 3.8,
          "Digital maturity": 1
        }
      },
      {
        "id": "company-5",
        "values": {
          "Company": "Empresa 5",
          "Revenue": 500,
          "EBITDA margin": 20.4,
          "Growth YoY": 8.7,
          "Digital maturity": 0.5
        }
      },
      {
        "id": "company-6",
        "values": {
          "Company": "Empresa 6",
          "Revenue": 825,
          "EBITDA margin": 21.2,
          "Growth YoY": 8.4,
          "Digital maturity": 1
        }
      }
    ]
  },
  "calculation": {
    "order": "declared-rows",
    "columnOrder": "declared-columns",
    "bounds": "reject",
    "coercion": "none"
  },
  "profile": {
    "readability": {
      "edgePadding": 16,
      "textGap": 6,
      "labels": "complete",
      "contours": "declared-primitives"
    },
    "margin": {
      "top": 12,
      "right": 16,
      "bottom": 12,
      "left": 16
    },
    "layout": {
      "entityColFraction": 0.23,
      "entityColMaxFraction": 0.34,
      "headerHeight": 40,
      "cellPaddingX": 8,
      "headerMaxLines": 2,
      "minColumnWidth": 56
    },
    "header": {
      "fill": "theme:textPrimary",
      "fontSize": 11.5,
      "fontFamily": "font:ui",
      "fontWeight": 700,
      "unitFill": "theme:textMuted",
      "unitFontSize": 9.5,
      "unitFontWeight": 500
    },
    "entityCell": {
      "fill": "theme:textPrimary",
      "fontSize": 12,
      "fontFamily": "font:ui",
      "fontWeight": 600
    },
    "textCell": {
      "fill": "theme:textSecondary",
      "fontSize": 11.5,
      "fontFamily": "font:ui",
      "fontWeight": 400
    },
    "numberCell": {
      "fill": "theme:textPrimary",
      "fontSize": 12,
      "fontFamily": "font:ui",
      "fontWeight": 500
    },
    "barCell": {
      "fill": "theme:series.blue",
      "trackFill": "theme:borderLight",
      "showTrack": false,
      "height": 9,
      "radius": 1,
      "align": "right",
      "labelGap": 8,
      "minTrackWidth": 48,
      "labelWidthFraction": 0.36,
      "valueFill": "theme:textPrimary"
    },
    "deltaCell": {
      "positiveColor": "theme:positive",
      "negativeColor": "theme:negative",
      "neutralColor": "theme:textMuted",
      "triangleSize": 4.5,
      "gap": 6,
      "fontSize": 12,
      "fontFamily": "font:ui",
      "fontWeight": 600,
      "showSign": true
    },
    "harveyCell": {
      "radius": 8,
      "fillColor": "theme:series.blue",
      "emptyColor": "theme:surface",
      "strokeColor": "theme:series.blue",
      "strokeWidth": 1.25
    },
    "rules": {
      "header": {
        "stroke": "theme:textPrimary",
        "strokeWidth": 1.2
      },
      "row": {
        "stroke": "theme:borderLight",
        "strokeWidth": 1,
        "opacity": 1
      },
      "top": {
        "show": false,
        "stroke": "theme:textPrimary",
        "strokeWidth": 1.2
      },
      "bottom": {
        "show": true,
        "stroke": "theme:textPrimary",
        "strokeWidth": 1.2
      }
    },
    "rowHighlight": {
      "ids": [
        "company-6"
      ],
      "fill": "theme:surfaceAlt"
    },
    "rowHover": {
      "fill": "theme:surfaceHover",
      "opacity": 0.6
    },
    "missingPlaceholder": "–"
  },
  "annotations": []
}
