How can I have same hover point color in highcharts?

不打扰是莪最后的温柔 提交于 2020-02-07 07:48:06

问题


I want to have same hover point color as when point was in hover off state. Plunker link here

For example: for success tasks I have green colored point so on hover also point color should be green but instead it turns blue. Please help

Code
plotOptions: {
    ...
    series: {
        cursor: 'pointer',
        dataGrouping: {
            enabled: false
        },
        marker: {
            radius: 4,
            states: {
                hover: {
                    fillColor: null
                }
            }
        },
        turboThreshold: 1000000
    }
},

回答1:


well as a roundabout to your problem you could try something like this

     plotOptions: {
      ....
      series: {
       cursor: 'pointer',
       dataGrouping: {
         enabled: false
       },
       marker: {
         radius: 4,
         states: {
           hover: {
             fillColor: function(){
               return true;
             }
           }
         }
       },
       turboThreshold: 1000000
     }
   },


来源:https://stackoverflow.com/questions/30642310/how-can-i-have-same-hover-point-color-in-highcharts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!