隐藏dc.js图表​​X轴 [英] Hide dc.js chart x-axis

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

问题描述

如下图所示,由于数据范围大,x轴非常混乱。
我希望删除x轴,是否有运气?

As the image below, the x-axis is very messy due to big range of data. I wish to remove the x-axis, any luck?

我当前的代码:

toneChart.width(300).height(280)
    .dimension(tone)
    .group(toneGroup)
    .title(function (d) { return ""; })
    .ordering(function(d) { return - d.value })
    .cap(10)
    .transitionDuration(750)
    .renderLabel(true)
    .colors(d3.scale.category10())
    .elasticX(true);

谢谢!

推荐答案

好笑!我刚刚解决了这个问题!

Funny! I just solved it!

提示:调整图表边距。脏但是对我来说很好:-P

Tips: adjust the chart margins. Dirty but working fine for me :-P

.margins({top: 0, right: 0, bottom: -1, left: 0})

这篇关于隐藏dc.js图表​​X轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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