隐藏轴刻度值 [英] Hide axis tick values

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

问题描述

有没有一种方法可以隐藏c3js(版本0.1.42)中的轴刻度值?在其中一张图中,我的分类轴具有较长的刻度值.我想隐藏它们并仅在鼠标悬停时显示.我尝试了 http://c3js.org/samples中提到的剔除剔除选项(通过将max设置为0)/axes_x_tick_culling.html ,但是它不起作用.

Is there a way to hide axis tick values in c3js (version 0.1.42)? In one of the graphs, I have categorical axis with long tick values. I want to hide them and show only on mouseover. I have tried the tick culling option (by setting max to 0) mentioned at http://c3js.org/samples/axes_x_tick_culling.html but it does not work.

推荐答案

您可以尝试以下方法:

以tick格式()方法返回空字符串,如下所示:-

Return empty string in the tick format() method as shown below:-

axis : {
    x : {
        type : 'categorized',
        tick: {
            format: function (x) { return ''; }
        }
    }
}

这篇关于隐藏轴刻度值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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