如何隐藏堆栈条形图高图中的轴线

问题描述 投票:0回答:2

我想删除堆叠条形图中图例之后的细轴线。如何实现?

 xAxis: {
    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
  lineColor: 'transparent',
   tickWidth: 0,
   tickLength: 0,
   tickColor:'transparent',
   visible:true,
  }

Jsfiddle 链接 https://jsfiddle.net/mehrotrarohit87/51mky0so/1/

highcharts bar-chart stacked-chart
2个回答
0
投票

API 中没有这样的选项,因此您需要以编程方式隐藏此网格。

chart: {
    type: 'bar',
    marginLeft: 50,
    marginBottom: 90,
    gridLineWidth: 0,
            events: {
                load() {
                    const chart = this;
                    const ticks = chart.yAxis[0].ticks;
                    ticks[0].gridLine.hide()
                }
            }
},

演示:https://jsfiddle.net/BlackLabel/9zpun5ow/


0
投票
{
   ...
   xAxis: {
      lineColor: 'transparent', // hide x axis line
   }
   ...
}
© www.soinside.com 2019 - 2024. All rights reserved.