Highcharts:更改柱状图的突出显示颜色 [英] Highcharts: Change Highlight Color of Column Chart

查看:1306
本文介绍了Highcharts:更改柱状图的突出显示颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将下列小提琴中列组的背景/高光颜色更改为另一种颜色,而不是默认显示的淡蓝色?

我尝试过使用 plotOptions 以各种方式完成任务。

  plotOptions:{
列:{
events:{
hover:{
background:'#000000'
}
}
}
}

http://jsfiddle.net/vcehgfge/2/

解决方案

突出显示来自 xAxis.crosshair = true 。这似乎没有记录,但功能类似于 tooltip.crosshairs API ),它允许您自定义十字准线。 =http://jsfiddle.net/vcehgfge/3/ =noreferrer> JSFiddle ):

  xAxis:{
crosshair:{
color:'pink'
}
}

其外观与此相同( JSFiddle ):

 工具提示:{
十字线:{
颜色:'粉红'
}
}

可能后者是优先选择的,因为它实际上是记录在案的。


How can I change the background/highlight color of the column group in the following fiddle to another color than the light blue that shows by default?

I have tried using plotOptions in various ways which all fail to accomplish the task.

plotOptions: {
    column: {
        events: {
            hover: {
                background: '#000000'
            }
        }
    }
}

http://jsfiddle.net/vcehgfge/2/

解决方案

The highlighting comes from xAxis.crosshair = true. This seems to be undocumented, but similar in function to tooltip.crosshairs (API), which allows you to customize the crosshair quite a bit.

You could change to instead use this object (JSFiddle):

xAxis: {
    crosshair: {
        color: 'pink'
    }
}

Which is equivalent in appearance to this (JSFiddle):

tooltip: {
    crosshairs: {
        color: 'pink'
    }
}

It may be that the latter is preffered, since it is actually documented.

这篇关于Highcharts:更改柱状图的突出显示颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆