如何在 ChartJs 中隐藏 y 轴线? [英] How to hide y axis line in ChartJs?

查看:30
本文介绍了如何在 ChartJs 中隐藏 y 轴线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用气泡图并且必须隐藏 y 轴线.我已经尝试了以下但它不起作用.

I am using bubble chart and gotta hide the y axis line. I've tried the following but it doesn't work.

yAxes: [{
  angleLines: {
    display: false
  }
}]

推荐答案

这将禁用垂直 Y 轴线:

This disables the vertical Y axis line:

options: {
  scales: {
    yAxes: [{
      gridLines: {
        drawBorder: false,
      },
    }]
  },
},

这可以结合 display 来禁用垂直网格线:

This can be combined with display to disable the vertical gridLines:

xAxes: [{
  gridLines: {
    display: false,
  },
}],

这是一个工作示例:http://codepen.io/anon/pen/xqGGaV

这篇关于如何在 ChartJs 中隐藏 y 轴线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆