$('.scheme-wrap polygon').click(function() {
$(`.scheme-wrap__item[data-id="${this.dataset.id}"] .scheme-wrap__popup`).show();
});
или
.scheme-wrap__popup.visible {
display: block;
}
document.querySelectorAll('.scheme-wrap polygon').forEach(n => {
n.addEventListener('click', onClick);
});
function onClick({ currentTarget: { dataset: { id } } }) {
const selector = `.scheme-wrap__item[data-id="${id}"] .scheme-wrap__popup`;
const popup = document.querySelector(selector);
if (popup) {
popup.classList.add('visible');
}
}