【问题标题】:HeatMap with custom muticolors for some cell具有某些单元格的自定义多色的 HeatMap
【发布时间】:2020-06-05 19:17:54
【问题描述】:

我正在尝试根据坐标/ x 和 y 轴点为每个单元格生成带有自定义颜色的热图。如果我将鼠标悬停在该单元格上,y 轴在 x4 中的划分不均,它会改变颜色如何修复它

http://jsfiddle.net/2m3sqckj

以下是我的观点

            [{x:4,y:0, value:90, color:'red'},
            {x:4,y:0.5, value:90, color:'orange'},
            {x:4,y:1.2, value:90, color:'red'},
            {x:4,y:3, value:90, color:'yellow'},
            {x:4,y:4, value:90, color:'yellow'}]

【问题讨论】:

  • 需要为该系列设置 enableMouseTracking: false

标签: heatmap react-highcharts


【解决方案1】:

在深入研究此问题后,我发现这可能是一种故意行为。请查看此主题:https://github.com/highcharts/highcharts/issues/6064 如果您有其他意见,请随时在评论中分享。

同时,我为您的问题找到了解决方法:http://jsfiddle.net/BlackLabel/yfaj1ro3/

为点设置更高的索引。

  Highcharts.seriesTypes.heatmap.prototype.pointClass.prototype.setState = function(state) {
    var point = this,
            zIndex = point.zIndex || 0;
    Highcharts.Point.prototype.setState.call(this, state);
    this.graphic.attr({
      zIndex: zIndex
    });
  };

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-10
    • 2016-12-29
    • 1970-01-01
    • 2012-12-27
    相关资源
    最近更新 更多