使用 markerGroup.toFront() 时如何设置悬停线宽?

How to set hover lineWidth when using markerGroup.toFront()?

Here is my demo

当 legend/series 鼠标悬停时,我使用 toFront 更改系列 Z-index,

但是当我写的时候线宽似乎没有改变

我应该如何设置 lineWidth 属性?谢谢!

element.onmouseover = function () {
           each(series, function (seriesItem) {
                    if (seriesItem === item) {
                    seriesItem.markerGroup.toFront();
                } else if (seriesItem !== item) {
                    each(['group', 'markerGroup'], function (group) {
                        seriesItem[group].attr('opacity', 0.25);
                    });
                }
            });
        }

pistou's answer

修复
function(chart){
        $(chart.series).each(function(i, serie){
            $(serie.legendItem.element).hover(function(){
                highlight(chart.series, serie.index, true);
            }, function(){
                highlight(chart.series, serie.index, false);
            });
        });

        function highlight(series, index, hide) {
            $(series).each(function (i, serie) {
                if(i != index) {
                    $.each(serie.data, function (k, data) {
                        if(data.series) {
                            /* data.series.graph && data.series.graph.attr("stroke", (hide ? "#D4D4D4": serie.color)); */
                            /* data.series.markerGroup && data.series.markerGroup.attr("visibility", (hide ? "hidden": "visible")); */
                        }
                    });

                } else {
                    serie.group.toFront();
                    $.each(serie.data, function (k, data) {
                        if(data.series) {
                            data.series.graph && data.series.graph.attr("stroke", serie.color);
                        }
                    });
                }
            });
        }
    }