本文介绍了隐藏轴和网格线Highcharts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图完全隐藏我的Highcharts图表的轴和网格线。
到目前为止,我已经尝试将行的宽度设置为0,但它没有成功。

I am trying to hide the axis and gridlines of my Highcharts chart entirely.So far I have tried to set the width of the lines to 0, but it didn't work out.

xAxis: {
  lineWidth: 0,
  minorGridLineWidth: 0,
  lineColor: 'transparent'
}

是否可以全局禁用轴线/刻度线和网格线以创建一个简单绘图?

Is it possible to just globally disable the axis lines/ticks and gridlines to create a "plain" plot?

推荐答案

只需添加

xAxis: {
   ...
   lineWidth: 0,
   minorGridLineWidth: 0,
   lineColor: 'transparent',
   ...
   labels: {
       enabled: false
   },
   minorTickLength: 0,
   tickLength: 0
}

xAxis定义。

这篇关于隐藏轴和网格线Highcharts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-02 09:11