svg {
    width: 600px;
    height: 350px;
    border: 1px solid #ccc;
    /* padding: 10px; */
  }

  .tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    display: none;
  }

  rect:hover {
    opacity: 0.8;
    stroke: #000;
    stroke-width: 2px;
    cursor: pointer;
  }

  .legend {
    margin-top: 10px;
    font-family: Arial, sans-serif;
  }

  .legend span {
    margin-right: 20px;
    display: inline-block;
  }

  .legend .box {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    vertical-align: middle;
  }