Я отображаю карту США с GeoChart, у меня есть список городов, кроме карты (не таблица визуализации, а список ul).Когда я наводю курсор на каждый город, я успешно выбираю правильный маркер на карте и показываю его подсказку.Я делаю это с помощью "setSelection ()":
$(".about__map__list__item").hover(
function() {
//Get the index of the hovered element
var currentIndex = $(this).index();
//Select the marker with the matching index
chart.setSelection([{ row: currentIndex }]);
//Find the added tooltip, animate it's entrance
setTimeout(function() {
$(".google-visualization-tooltip").addClass(
"tooltip-in"
);
}, 300);
},
function() {
//On Mouse out, empty the selection
chart.setSelection([]);
}
);
Если я наведу маркер непосредственно, я могу изменить его цвет заливки:
$("circle").hover(
function() {
setTimeout(function() {
$(".google-visualization-tooltip").addClass(
"tooltip-in"
);
}, 300);
$(this).css({
fill: "#00b1e9"
});
},
function() {
$(this).css({
fill: "#092e53"
});
}
);
Как мне добиться этого изменения цветав первом случае, когда я выбираю маркер с "setSelection"?