highlight series name in tooltip when shared tooltip active

This commit is contained in:
Mitsuhiro Tanda 2016-03-29 14:45:25 +09:00
parent b745726462
commit 0a13b7c559

View File

@ -142,11 +142,16 @@ function ($) {
continue;
}
var highlightStyle = '';
if (item && i === item.seriesIndex) {
highlightStyle = ' style="font-weight: bold;"';
}
series = seriesList[i];
value = series.formatValue(hoverInfo.value);
seriesHtml += '<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name">';
seriesHtml += '<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name"' + highlightStyle + '>';
seriesHtml += '<i class="fa fa-minus" style="color:' + series.color +';"></i> ' + series.label + ':</div>';
seriesHtml += '<div class="graph-tooltip-value">' + value + '</div></div>';
plot.highlight(i, hoverInfo.hoverIndex);