【问题标题】:How to hide the Axis line in stack bar chart high chart如何隐藏堆栈条形图高图表中的轴线
【发布时间】:2021-12-30 10:38:36
【问题描述】:

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

 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


    【解决方案1】:

    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/

    【讨论】:

      猜你喜欢
      • 2020-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-05
      相关资源
      最近更新 更多