You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Highcharts瀑布图如何移除图表中残留显示的Series 1

问题原因

你配置的legend: {enabled: false}和showInLegend: false仅能控制图例区域的显示,而你看到的Series 1文字不属于图例内容,是Highcharts默认开启的系列直连标签:当你未给series手动设置name属性时,Highcharts会自动生成Series 1作为默认系列名,通过这个标签直接绘制在绘图区边缘,不受图例相关配置控制。

解决方法

任选以下一种方案即可:

  • 直接关闭系列标签(最彻底)
    可以选择全局关闭所有系列的直连标签,在现有plotOptions.series配置块中添加label配置:
plotOptions: {
  column: {
    // 你原有的column配置保持不变
    dataLabels: {
      enabled: true,
      color: '#000000'
    },
    colorByPoint: true,
    pointWidth: 150
  },
  series: {
    borderWidth: 0,
    dataLabels: {
      enabled: true,
      format: '{point.y}'
    },
    turboThreshold: 0,
    // 新增以下配置关闭标签
    label: {
      enabled: false
    }
  }
}

也可以仅关闭当前瀑布图系列的标签,在现有series配置项中添加:

series: [{
  data: [],
  showInLegend: false,
  // 新增以下配置
  label: {
    enabled: false
  },
  zones: [/* 你原有的zones配置保持不变 */]
}]
  • 保留标签但隐藏默认文字
    如果你不想完全关闭标签功能,只需要给当前series设置空字符串作为名称即可,默认的Series 1文字就不会显示:
series: [{
  // 新增name配置
  name: '',
  data: [],
  showInLegend: false,
  zones: [/* 原有配置不变 */]
}]

额外配置优化建议

你当前把瀑布图的点宽、按点着色等配置写在了plotOptions.column下,虽然waterfall类型会继承部分column配置,但建议把瀑布图专属配置单独移到plotOptions.waterfall块下,避免配置不生效:

plotOptions: {
  // 新增waterfall专属配置块
  waterfall: {
    dataLabels: {
      enabled: true,
      color: '#000000'
    },
    colorByPoint: true,
    pointWidth: 150,
    borderWidth: 0
  },
  series: {
    dataLabels: {
      enabled: true,
      format: '{point.y}'
    },
    turboThreshold: 0,
    label: {
      enabled: false
    }
  }
}

问题效果截图

内容的提问来源于stack exchange,提问作者strange_098

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.27 07:24:25