如何更改highcharts中选定点的样式?

Dmy*_*kin 4 highcharts

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

eol*_*son 18

您为markers.state.selectas 设置样式:

    plotOptions: {
        series: {
            allowPointSelect: true,
            marker: {
                states: {
                    select: {
                        fillColor: 'red',
                        lineWidth: 0
                    }
                }
            }
        }
    }
Run Code Online (Sandbox Code Playgroud)

示例: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'
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

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