{"spec_id":"curve-dose-response","library":"muix","language":"javascript","code":"// anyplot.ai\n// curve-dose-response: Pharmacological Dose-Response Curve\n// Library: muix 9.16.0 | JavaScript 22.23.3\n// Quality: 86/100 | Updated: 2026-10-24\n\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { ChartsContainer } from \"@mui/x-charts/ChartsContainer\";\nimport { ChartsGrid } from \"@mui/x-charts/ChartsGrid\";\nimport { ChartsXAxis } from \"@mui/x-charts/ChartsXAxis\";\nimport { ChartsYAxis } from \"@mui/x-charts/ChartsYAxis\";\nimport { ScatterPlot } from \"@mui/x-charts/ScatterChart\";\nimport { useDrawingArea, useXScale, useYScale } from \"@mui/x-charts/hooks\";\n\nconst t = window.ANYPLOT_TOKENS;\nconst { width, height } = window.ANYPLOT_SIZE;\n\n// Constants\nconst TITLE = \"curve-dose-response · javascript · muix · anyplot.ai\";\nconst FONT = \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nconst CURVE_SAMPLES = 90;\nconst LOG_PAD_SHARE = 0.09;\nconst Y_PAD_SHARE = 0.12;\nconst ERROR_CAP = 7;\n\nconst SI_PREFIXES = [\n  { exp: -12, prefix: \"p\" },\n  { exp: -9, prefix: \"n\" },\n  { exp: -6, prefix: \"µ\" },\n  { exp: -3, prefix: \"m\" },\n  { exp: 0, prefix: \"\" },\n];\n\nconst T_CRIT_95: Record<number, number> = {\n  1: 12.706,\n  2: 4.303,\n  3: 3.182,\n  4: 2.776,\n  5: 2.571,\n  6: 2.447,\n  7: 2.365,\n  8: 2.306,\n  9: 2.262,\n  10: 2.228,\n  12: 2.179,\n  15: 2.131,\n  20: 2.086,\n  30: 2.042,\n};\n\n// Columns: set these to your data's column names\nconst COMPOUND = \"Compound\"; // role: compound\nconst CONCENTRATION = \"Concentration (M)\"; // role: concentration\nconst RESPONSE = \"Response (%)\"; // role: response\nconst RESPONSE_SEM = \"Response SEM (%)\"; // role: response_sem\n\n// Data: replace this block with your own records\nconst data = [\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 1e-9, [RESPONSE]: 2.8, [RESPONSE_SEM]: 2.6 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 3.16e-9, [RESPONSE]: 4.1, [RESPONSE_SEM]: 3.1 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 1e-8, [RESPONSE]: 5.6, [RESPONSE_SEM]: 3.4 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 3.16e-8, [RESPONSE]: 18.2, [RESPONSE_SEM]: 4.2 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 1e-7, [RESPONSE]: 50.4, [RESPONSE_SEM]: 4.8 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 3.16e-7, [RESPONSE]: 82.1, [RESPONSE_SEM]: 4.1 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 1e-6, [RESPONSE]: 94.3, [RESPONSE_SEM]: 3.3 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 3.16e-6, [RESPONSE]: 97.1, [RESPONSE_SEM]: 2.9 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 1e-5, [RESPONSE]: 97.8, [RESPONSE_SEM]: 2.7 },\n  { [COMPOUND]: \"Osimertinib\", [CONCENTRATION]: 1e-4, [RESPONSE]: 98.1, [RESPONSE_SEM]: 2.5 },\n\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 1e-9, [RESPONSE]: 5.2, [RESPONSE_SEM]: 2.8 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 3.16e-9, [RESPONSE]: 6.1, [RESPONSE_SEM]: 3.0 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 1e-8, [RESPONSE]: 7.4, [RESPONSE_SEM]: 3.2 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 3.16e-8, [RESPONSE]: 9.8, [RESPONSE_SEM]: 3.6 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 1e-7, [RESPONSE]: 16.5, [RESPONSE_SEM]: 4.1 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 3.16e-7, [RESPONSE]: 30.8, [RESPONSE_SEM]: 4.7 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 1e-6, [RESPONSE]: 49.2, [RESPONSE_SEM]: 5.1 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 3.16e-6, [RESPONSE]: 68.4, [RESPONSE_SEM]: 4.4 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 1e-5, [RESPONSE]: 79.1, [RESPONSE_SEM]: 3.7 },\n  { [COMPOUND]: \"Gefitinib\", [CONCENTRATION]: 1e-4, [RESPONSE]: 84.6, [RESPONSE_SEM]: 3.1 },\n];\n\n// Plot: reads only data and the constants above\nconst COMPOUND_NAMES = Array.from(new Set(data.map((d) => String(d[COMPOUND]))));\nconst allConcs = data.map((d) => Number(d[CONCENTRATION]));\nconst allResp = data.map((d) => Number(d[RESPONSE]));\nconst allSem = data.map((d) => Number(d[RESPONSE_SEM]));\n\nconst rawLogMin = Math.log10(Math.min(...allConcs));\nconst rawLogMax = Math.log10(Math.max(...allConcs));\nconst logSpan = rawLogMax - rawLogMin;\nconst logMin = rawLogMin - logSpan * LOG_PAD_SHARE;\nconst logMax = rawLogMax + logSpan * LOG_PAD_SHARE;\nconst xMin = Math.pow(10, logMin);\nconst xMax = Math.pow(10, logMax);\n\nconst rawYMin = Math.min(...allResp.map((v, i) => v - allSem[i]));\nconst rawYMax = Math.max(...allResp.map((v, i) => v + allSem[i]));\nconst ySpan = rawYMax - rawYMin;\nconst yMin = rawYMin - ySpan * Y_PAD_SHARE;\nconst yMax = rawYMax + ySpan * Y_PAD_SHARE;\n\nconst CONC_UNIT = CONCENTRATION.match(/\\(([^)]+)\\)/)?.[1] ?? \"\";\nconst RESP_UNIT = RESPONSE.match(/\\(([^)]+)\\)/)?.[1] ?? \"\";\n\n// Concentration with an SI prefix, e.g. 1e-7 → \"100 nM\"\nconst formatConc = (v: number) => {\n  let best = SI_PREFIXES[0];\n  for (const entry of SI_PREFIXES) {\n    if (Math.log10(v) >= entry.exp - 1e-9) best = entry;\n  }\n  const scaled = Number((v / Math.pow(10, best.exp)).toPrecision(3));\n  return `${scaled} ${best.prefix}${CONC_UNIT}`;\n};\n\nconst tickPowers: number[] = [];\nfor (let p = Math.ceil(logMin); p <= Math.floor(logMax); p++) {\n  tickPowers.push(Math.pow(10, p));\n}\n\nconst curveXs = Array.from({ length: CURVE_SAMPLES }, (_, i) =>\n  Math.pow(10, logMin + (i / (CURVE_SAMPLES - 1)) * (logMax - logMin)),\n);\n\nconst GROUPS = COMPOUND_NAMES.map((name, idx) => {\n  const rows = data\n    .filter((d) => String(d[COMPOUND]) === name)\n    .map((d, i) => ({\n      id: `${name}-${i}`,\n      x: Number(d[CONCENTRATION]),\n      y: Number(d[RESPONSE]),\n      sem: Number(d[RESPONSE_SEM]),\n    }))\n    .sort((a, b) => a.x - b.x);\n\n  const color = t.palette[idx];\n\n  let bottom = rows[0].y;\n  let top = rows[rows.length - 1].y;\n  const initHalf = (bottom + top) / 2;\n  let logEc50 = (rawLogMin + rawLogMax) / 2;\n  for (let i = 0; i < rows.length - 1; i++) {\n    if ((rows[i].y - initHalf) * (rows[i + 1].y - initHalf) <= 0) {\n      const denom = rows[i + 1].y - rows[i].y;\n      const frac = (initHalf - rows[i].y) / denom;\n      logEc50 =\n        Math.log10(rows[i].x) + frac * (Math.log10(rows[i + 1].x) - Math.log10(rows[i].x));\n      break;\n    }\n  }\n  let hill = 1.4;\n\n  const steps = [0.25, 0.08, 0.02, 0.005];\n  for (const step of steps) {\n    for (let iter = 0; iter < 15; iter++) {\n      for (let paramIdx = 0; paramIdx < 4; paramIdx++) {\n        const delta = paramIdx < 2 ? step * 4 : step;\n        let bestVal = [bottom, top, logEc50, hill][paramIdx];\n        let bestSse = Infinity;\n        for (const mult of [-1, 0, 1]) {\n          const cand = [bottom, top, logEc50, hill];\n          cand[paramIdx] += mult * delta;\n          const [bC, tC, lC, hC] = cand;\n          const ecC = Math.pow(10, lC);\n          let sse = 0;\n          for (const r of rows) {\n            const pred = bC + (tC - bC) / (1 + Math.pow(ecC / r.x, hC));\n            sse += (r.y - pred) ** 2;\n          }\n          if (sse < bestSse) {\n            bestSse = sse;\n            bestVal = cand[paramIdx];\n          }\n        }\n        if (paramIdx === 0) bottom = bestVal;\n        if (paramIdx === 1) top = bestVal;\n        if (paramIdx === 2) logEc50 = bestVal;\n        if (paramIdx === 3) hill = bestVal;\n      }\n    }\n  }\n\n  const ec50 = Math.pow(10, logEc50);\n  const halfMax = (bottom + top) / 2;\n  const curveY = curveXs.map((c) => bottom + (top - bottom) / (1 + Math.pow(ec50 / c, hill)));\n\n  // Residual variance s² = SSE / (n - 4) + numeric Jacobian covariance (J^T J)^-1 s²\n  let finalSse = 0;\n  for (const r of rows) {\n    const pred = bottom + (top - bottom) / (1 + Math.pow(ec50 / r.x, hill));\n    finalSse += (r.y - pred) ** 2;\n  }\n  const df = rows.length - 4;\n  const s2 = finalSse / df;\n  const tCrit = T_CRIT_95[df];\n\n  const eps = [1e-4, 1e-4, 1e-5, 1e-4];\n  const jtj = Array.from({ length: 4 }, () => [0, 0, 0, 0]);\n  for (let k = 0; k < 4; k++) jtj[k][k] = 1e-8;\n  for (const r of rows) {\n    const gRow = [0, 0, 0, 0];\n    for (let k = 0; k < 4; k++) {\n      const pPlus = [bottom, top, logEc50, hill];\n      const pMinus = [bottom, top, logEc50, hill];\n      pPlus[k] += eps[k];\n      pMinus[k] -= eps[k];\n      const fPlus =\n        pPlus[0] + (pPlus[1] - pPlus[0]) / (1 + Math.pow(Math.pow(10, pPlus[2]) / r.x, pPlus[3]));\n      const fMinus =\n        pMinus[0] +\n        (pMinus[1] - pMinus[0]) / (1 + Math.pow(Math.pow(10, pMinus[2]) / r.x, pMinus[3]));\n      gRow[k] = (fPlus - fMinus) / (2 * eps[k]);\n    }\n    for (let a = 0; a < 4; a++) {\n      for (let b = 0; b < 4; b++) {\n        jtj[a][b] += gRow[a] * gRow[b];\n      }\n    }\n  }\n\n  // Invert 4x4 jtj via Gauss-Jordan\n  const aug = jtj.map((row, rIdx) => [\n    ...row,\n    rIdx === 0 ? 1 : 0,\n    rIdx === 1 ? 1 : 0,\n    rIdx === 2 ? 1 : 0,\n    rIdx === 3 ? 1 : 0,\n  ]);\n  for (let col = 0; col < 4; col++) {\n    let piv = col;\n    for (let rIdx = col + 1; rIdx < 4; rIdx++) {\n      if (Math.abs(aug[rIdx][col]) > Math.abs(aug[piv][col])) piv = rIdx;\n    }\n    const tmp = aug[col];\n    aug[col] = aug[piv];\n    aug[piv] = tmp;\n    const div = aug[col][col];\n    for (let j = 0; j < 8; j++) aug[col][j] /= div;\n    for (let rIdx = 0; rIdx < 4; rIdx++) {\n      if (rIdx === col) continue;\n      const factor = aug[rIdx][col];\n      for (let j = 0; j < 8; j++) aug[rIdx][j] -= factor * aug[col][j];\n    }\n  }\n  const jtjInv = aug.map((row) => row.slice(4, 8));\n\n  const ciUpper: number[] = [];\n  const ciLower: number[] = [];\n  for (let i = 0; i < curveXs.length; i++) {\n    const cx = curveXs[i];\n    const gVec = [0, 0, 0, 0];\n    for (let k = 0; k < 4; k++) {\n      const pPlus = [bottom, top, logEc50, hill];\n      const pMinus = [bottom, top, logEc50, hill];\n      pPlus[k] += eps[k];\n      pMinus[k] -= eps[k];\n      const fPlus =\n        pPlus[0] + (pPlus[1] - pPlus[0]) / (1 + Math.pow(Math.pow(10, pPlus[2]) / cx, pPlus[3]));\n      const fMinus =\n        pMinus[0] +\n        (pMinus[1] - pMinus[0]) / (1 + Math.pow(Math.pow(10, pMinus[2]) / cx, pMinus[3]));\n      gVec[k] = (fPlus - fMinus) / (2 * eps[k]);\n    }\n    let varPred = 0;\n    for (let a = 0; a < 4; a++) {\n      for (let b = 0; b < 4; b++) {\n        varPred += gVec[a] * jtjInv[a][b] * gVec[b];\n      }\n    }\n    const se = Math.sqrt(Math.max(0, varPred * s2));\n    const halfBand = tCrit * se;\n    ciUpper.push(curveY[i] + halfBand);\n    ciLower.push(curveY[i] - halfBand);\n  }\n\n  const ec50Label = `${name} (EC₅₀ = ${formatConc(ec50)})`;\n\n  return {\n    name,\n    color,\n    rows,\n    bottom,\n    top,\n    ec50,\n    hill,\n    halfMax,\n    ec50Label,\n    curveY,\n    ciUpper,\n    ciLower,\n  };\n});\n\nconst SUBTITLE = `4PL sigmoid fit across ${GROUPS.length} ${COMPOUND}s · ${RESPONSE} ± ${RESPONSE_SEM} with pointwise 95% CI bands and EC₅₀ drop-lines`;\n\nconst scatterSeries = GROUPS.map((g) => ({\n  type: \"scatter\" as const,\n  id: `scatter-${g.name}`,\n  label: g.ec50Label,\n  data: g.rows,\n  color: g.color,\n  markerSize: 7,\n  xAxisId: \"concentration\",\n  yAxisId: \"response\",\n}));\n\nfunction DoseResponseOverlay() {\n  const xScale = useXScale(\"concentration\") as any;\n  const yScale = useYScale(\"response\") as any;\n  const { left, width: areaW, top, height: areaH } = useDrawingArea();\n\n  const yBottomAxis = top + areaH;\n\n  return (\n    <g fontFamily={FONT}>\n      {/* Pointwise 95% CI bands */}\n      {GROUPS.map((g) => {\n        const upper = curveXs.map((x, i) => [xScale(x), yScale(g.ciUpper[i])]);\n        const lower = curveXs.map((x, i) => [xScale(x), yScale(g.ciLower[i])]);\n        const pts = [...upper, ...lower.slice().reverse()];\n        const d =\n          pts\n            .map((p, i) => `${i === 0 ? \"M\" : \"L\"}${p[0].toFixed(1)},${p[1].toFixed(1)}`)\n            .join(\" \") + \" Z\";\n        return <path key={`ci-${g.name}`} d={d} fill={g.color} fillOpacity={0.18} stroke=\"none\" />;\n      })}\n\n      {/* Top and bottom plateau asymptote dashed lines */}\n      {GROUPS.map((g, idx) => {\n        const yTop = yScale(g.top);\n        const yBot = yScale(g.bottom);\n        const labelX = left + 12 + idx * 145;\n        return (\n          <g key={`asym-${g.name}`}>\n            <line\n              x1={left}\n              y1={yTop}\n              x2={left + areaW}\n              y2={yTop}\n              stroke={g.color}\n              strokeDasharray=\"4,5\"\n              strokeWidth={1.3}\n              strokeOpacity={0.55}\n            />\n            <text\n              x={labelX}\n              y={yTop - 6}\n              fontSize={14}\n              fontWeight={500}\n              fill={g.color}\n            >\n              {`Top ${Math.round(g.top)}${RESP_UNIT}`}\n            </text>\n            <line\n              x1={left}\n              y1={yBot}\n              x2={left + areaW}\n              y2={yBot}\n              stroke={g.color}\n              strokeDasharray=\"4,5\"\n              strokeWidth={1.3}\n              strokeOpacity={0.55}\n            />\n            <text\n              x={left + areaW - 12 - (GROUPS.length - 1 - idx) * 120}\n              y={idx === 0 ? yBot + 18 : yBot - 6}\n              textAnchor=\"end\"\n              fontSize={14}\n              fontWeight={500}\n              fill={g.color}\n            >\n              {`Bottom ${Math.round(g.bottom)}${RESP_UNIT}`}\n            </text>\n          </g>\n        );\n      })}\n\n      {/* EC50 horizontal & vertical drop-lines intersecting at (ec50, halfMax) */}\n      {GROUPS.map((g, idx) => {\n        const cx = xScale(g.ec50);\n        const cy = yScale(g.halfMax);\n        const badgeX = idx === 0 ? cx - 108 : cx + 10;\n        const badgeY = idx === 0 ? cy - 30 : cy + 10;\n        return (\n          <g key={`ec50-${g.name}`}>\n            <line\n              x1={left}\n              y1={cy}\n              x2={cx}\n              y2={cy}\n              stroke={g.color}\n              strokeDasharray=\"6,4\"\n              strokeWidth={1.6}\n              strokeOpacity={0.85}\n            />\n            <line\n              x1={cx}\n              y1={cy}\n              x2={cx}\n              y2={yBottomAxis}\n              stroke={g.color}\n              strokeDasharray=\"6,4\"\n              strokeWidth={1.6}\n              strokeOpacity={0.85}\n            />\n            <circle cx={cx} cy={cy} r={5} fill={t.pageBg} stroke={g.color} strokeWidth={2.5} />\n            <rect\n              x={badgeX}\n              y={badgeY}\n              width={98}\n              height={22}\n              rx={4}\n              fill={t.pageBg}\n              opacity={0.92}\n            />\n            <text\n              x={badgeX + 6}\n              y={badgeY + 16}\n              fontSize={14}\n              fontWeight={600}\n              fill={g.color}\n            >\n              {`EC₅₀ (${Math.round(g.halfMax)}${RESP_UNIT})`}\n            </text>\n          </g>\n        );\n      })}\n\n      {/* Smooth 4PL fitted sigmoid curves */}\n      {GROUPS.map((g) => {\n        const d = curveXs\n          .map((x, i) => {\n            const px = xScale(x).toFixed(1);\n            const py = yScale(g.curveY[i]).toFixed(1);\n            return `${i === 0 ? \"M\" : \"L\"}${px},${py}`;\n          })\n          .join(\" \");\n        return (\n          <path\n            key={`curve-${g.name}`}\n            d={d}\n            fill=\"none\"\n            stroke={g.color}\n            strokeWidth={3}\n            strokeLinecap=\"round\"\n          />\n        );\n      })}\n\n      {/* SEM error bars */}\n      {GROUPS.map((g) =>\n        g.rows.map((r) => {\n          const cx = xScale(r.x);\n          const ytop = yScale(r.y + r.sem);\n          const ybot = yScale(r.y - r.sem);\n          return (\n            <g key={`err-${r.id}`}>\n              <line x1={cx} y1={ytop} x2={cx} y2={ybot} stroke={g.color} strokeWidth={2.2} />\n              <line\n                x1={cx - ERROR_CAP}\n                y1={ytop}\n                x2={cx + ERROR_CAP}\n                y2={ytop}\n                stroke={g.color}\n                strokeWidth={2.2}\n              />\n              <line\n                x1={cx - ERROR_CAP}\n                y1={ybot}\n                x2={cx + ERROR_CAP}\n                y2={ybot}\n                stroke={g.color}\n                strokeWidth={2.2}\n              />\n            </g>\n          );\n        }),\n      )}\n    </g>\n  );\n}\n\nexport default function Chart() {\n  const chartW = width - 48;\n  const chartH = height - 150;\n\n  return (\n    <Box\n      sx={{\n        width,\n        height,\n        bgcolor: t.pageBg,\n        color: t.ink,\n        fontFamily: FONT,\n        display: \"flex\",\n        flexDirection: \"column\",\n        alignItems: \"center\",\n        pt: \"18px\",\n        px: \"24px\",\n        boxSizing: \"border-box\",\n      }}\n    >\n      <Typography\n        sx={{\n          fontSize: 22,\n          fontWeight: 700,\n          color: t.ink,\n          fontFamily: FONT,\n          textAlign: \"center\",\n          lineHeight: 1.2,\n        }}\n      >\n        {TITLE}\n      </Typography>\n      <Typography\n        sx={{\n          fontSize: 15,\n          color: t.inkSoft,\n          fontFamily: FONT,\n          textAlign: \"center\",\n          mt: \"4px\",\n          mb: \"4px\",\n        }}\n      >\n        {SUBTITLE}\n      </Typography>\n\n      <ChartsContainer\n        width={chartW}\n        height={chartH}\n        skipAnimation\n        margin={{ top: 20, right: 36, bottom: 16, left: 20 }}\n        series={scatterSeries}\n        xAxis={[\n          {\n            id: \"concentration\",\n            scaleType: \"log\",\n            min: xMin,\n            max: xMax,\n            height: 60,\n            label: CONCENTRATION,\n            tickInterval: tickPowers,\n            valueFormatter: formatConc,\n            tickLabelStyle: { fontSize: 14, fill: t.inkSoft, fontFamily: FONT },\n            labelStyle: { fontSize: 16, fill: t.ink, fontFamily: FONT },\n          },\n        ]}\n        yAxis={[\n          {\n            id: \"response\",\n            scaleType: \"linear\",\n            min: yMin,\n            max: yMax,\n            width: 80,\n            label: RESPONSE,\n            tickLabelStyle: { fontSize: 14, fill: t.inkSoft, fontFamily: FONT },\n            labelStyle: { fontSize: 16, fill: t.ink, fontFamily: FONT },\n          },\n        ]}\n        sx={{\n          \"& .MuiChartsAxis-line\": { stroke: t.inkSoft },\n          \"& .MuiChartsAxis-tick\": { stroke: t.inkSoft },\n          \"& .MuiChartsGrid-line\": { stroke: t.grid, strokeDasharray: \"4 4\" },\n        }}\n      >\n        <ChartsGrid horizontal />\n        <DoseResponseOverlay />\n        <ScatterPlot skipAnimation />\n        <ChartsXAxis axisId=\"concentration\" />\n        <ChartsYAxis axisId=\"response\" />\n      </ChartsContainer>\n\n      <Box\n        sx={{\n          display: \"flex\",\n          gap: \"28px\",\n          alignItems: \"center\",\n          justifyContent: \"center\",\n          mt: \"4px\",\n        }}\n      >\n        {GROUPS.map((g) => (\n          <Box key={g.name} sx={{ display: \"flex\", alignItems: \"center\", gap: \"8px\" }}>\n            <svg width={28} height={16}>\n              <rect x={2} y={2} width={24} height={12} fill={g.color} fillOpacity={0.22} rx={2} />\n              <line x1={2} y1={8} x2={26} y2={8} stroke={g.color} strokeWidth={3} strokeLinecap=\"round\" />\n              <circle cx={14} cy={8} r={4.5} fill={g.color} />\n            </svg>\n            <Typography sx={{ fontSize: 14, color: t.ink, fontFamily: FONT }}>\n              {`${g.ec50Label} · 95% CI`}\n            </Typography>\n          </Box>\n        ))}\n      </Box>\n    </Box>\n  );\n}\n"}