Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Highcharts Highchart-给系列标记其他zIndex,然后给系列线_Highcharts - Fatal编程技术网

Highcharts Highchart-给系列标记其他zIndex,然后给系列线

Highcharts Highchart-给系列标记其他zIndex,然后给系列线,highcharts,Highcharts,我在angular project工作,使用highchart 情况是: 在我的图表中,我有一个系列,类型区域 我希望yAxis网格线显示在我的系列上面,所以我给它:gridZIndex:10 问题是: yAxis也显示在序列标记的上方,我希望它仅显示在序列区域和直线上,而不是在标记上 有解决办法吗 请查看我绘制的演示: 对于这种情况,没有使用常规API选项的解决方案,因为SVG中的Z索引是由元素在文档中的显示顺序定义的。您可以尝试操作DOM,但是,此解决方案可能不适用于所有情况,例如动态图表更

我在angular project工作,使用highchart

情况是:

在我的图表中,我有一个系列,类型区域

我希望yAxis网格线显示在我的系列上面,所以我给它:gridZIndex:10

问题是:

yAxis也显示在序列标记的上方,我希望它仅显示在序列区域和直线上,而不是在标记上

有解决办法吗

请查看我绘制的演示:


对于这种情况,没有使用常规API选项的解决方案,因为SVG中的Z索引是由元素在文档中的显示顺序定义的。您可以尝试操作DOM,但是,此解决方案可能不适用于所有情况,例如动态图表更改,因此请记住,这更像是POC,而不是固定修复

演示:


加载事件的API:

谢谢。我别无选择,只能使用这个解决方案。请注意-我需要通过setTimeOut包装逻辑,否则在未定义的引用this.yAxis[0].gridGroup和this.series[0].markerGroup上失败
  chart: {
    polar: true,
    type: 'line',
    events: {
      load() {
        this.seriesGroup.element.insertBefore(
          this.yAxis[0].gridGroup.element,
          this.series[0].markerGroup.element
        )
      }
    }
  },