Highcharts 显示鼠标悬停在Y轴上代替柱的任何位置时的工具提示

Highcharts 显示鼠标悬停在Y轴上代替柱的任何位置时的工具提示,highcharts,highcharts-ng,Highcharts,Highcharts Ng,我想在其附近的任何位置悬停时,将批准计数的工具提示显示为0,是否可以使用highcharts?您可以将此特定列渲染为虚拟点-全范围透明颜色以显示其工具提示 Highcharts.chart('container', { chart: { type: 'bar' }, yAxis: { max: 10 }, tooltip: { formatter(tooltip) { if (this.point.isEmpty) {


我想在其附近的任何位置悬停时,将批准计数的工具提示显示为0,是否可以使用highcharts?

您可以将此特定列渲染为虚拟点-全范围透明颜色以显示其工具提示

Highcharts.chart('container', {

  chart: {
    type: 'bar'
  },

  yAxis: {
    max: 10
  },

  tooltip: {
    formatter(tooltip) {
      if (this.point.isEmpty) {
        return 'Null';
      }
      return tooltip.defaultFormatter.call(this, tooltip);
    }
  },

  series: [{
    data: [{
      x: 0,
      y: 2
    }, {
      x: 1,
      y: 3
    }, {
      x: 2,
      y: 10,
      color: 'transparent',
      isEmpty: true
    }, {
      x: 3,
      y: 8
    }, {
      x: 4,
      y: 2
    }]
  }]
});
演示:

API:

检查此项-如果它不能按照您的需要工作,请回答您的问题并添加到目前为止的代码。阅读如何创建一个。