4

我想改变选定点的风格。当我选择点时,它是灰色的。我希望我选择的所有点都是红色的。

4

1 回答 1

20

您将样式设置markers.state.select为:

    plotOptions: {
        series: {
            allowPointSelect: true,
            marker: {
                states: {
                    select: {
                        fillColor: 'red',
                        lineWidth: 0
                    }
                }
            }
        }
    }

示例:http: //jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-marker-states-select-fillcolor/

参考:http ://www.highcharts.com/ref/#plotOptions-scatter-marker-states-select

更新:对于条形图,配置应该略有不同(不知道为什么):

plotOptions: {
    series: {
        allowPointSelect: true,
        states: {
            select: {
                color: 'red'
            }
        }
    }
}

示例:http: //jsfiddle.net/8truG/

于 2012-06-25T17:20:25.207 回答