jqplot меняет цвет графика при наведении курсора мыши, когда на графике много точек данных - PullRequest
0 голосов
/ 04 февраля 2012
$.jqplot(
                this.loadAvgChartId,
                loadAvgChartData,
                {
                    height : 130,
                    width : 410,
                    fontSize : '9px',
                    seriesColors : [ '#3aa5dc',
                            '#032ecf' ],
                    series : [ {
                        label : 'Load-5',
                        showMarker : false,
                        lineWidth : 1,
                        shadowDepth : 0,
                        shadowOffset : 1.25,
                    }, {
                        label : 'Load-15',
                        showMarker : false,
                        lineWidth : 1,
                        shadowDepth : 0
                    } ],
                    legend : {
                        show : false
                    },
                    grid : {
                        gridLineColor : '#EBEBEB',
                        gridLineWidth : 1.0,
                        show : false,
                        shadow : false,
                        shadowDepth : 0,
                        background : '#FFF',
                        drawBorder : false,
                        borderColor : '#999',
                        borderWidth : '1.0'
                    },
                    cursor : {
                        zoom : false,
                        showToolTip : false,
                        showVerticalLine : false,
                        showCursorLegend : false,
                        intersectionThreshold : 20,
                        style: 'default'
                    },
                    highlighter : {                                     
                        bringSeriesToFront: this.isIE7?false:true,
                                shadow : false,
                                lineWidthAdjust: 1,
                                sizeAdjust: -3,
                                tooltipLocation: 'n',
                                tooltipAxes: 'both',
                                formatString: '<i>%s</i><br/><b>%s</b>',
                        useAxesFormatters : true
                    },
                    axes : {
                        xaxis : {
                            renderer : $.jqplot.DateAxisRenderer,
                            syncTicks : true,
                            tickOptions : {
                                showGridline : true,
                                formatString : this.nmdLoadAvgs[this.selectedLoadAvg].curTickFormatString
                            },
                            labelPosition : 'start',
                            tickInterval : this.nmdLoadAvgs[this.selectedLoadAvg].curTickInterval,
                            min : minXaxisTick,
                            max : maxXaxisTick
                        },
                        yaxis : {
                            tickOptions : {
                                showGridline : false,
                                showMark : false
                            },
                            //tickInterval : .5,
                            pad: 1.4,
                            min : 0.0,
                            max: maxYaxisTick,
                            numberTicks: 3
                        }
                    }
                }
            );

1 Ответ

1 голос
/ 18 апреля 2012

это сработало для меня: jqplot меняет цвет графика при наведении мыши

seriesDefaults:
{
    rendererOptions:
    {
        highlightMouseOver: false
    }
}
...