什么时候用手写 SVG

常用套路

一个最小柱状图骨架

<svg viewBox="0 0 320 160">
  <rect x="10"  y="60" width="40" height="100" fill="#3b82f6"/>
  <rect x="70"  y="90" width="40" height="70"  fill="#22ab94"/>
  <rect x="130" y="30" width="40" height="130" fill="#f0b90b"/>
</svg>
经验:SVG 的 y 轴向下,画柱状图时 y = 基线 - 高度、height = 数值,别搞反。需要交互再上库,静态展示手写最省事。