手动定位轴 - D3上的刻度 [英] Manually positioning ticks on axis - D3

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

问题描述

我使用d3做图,我想把蜱在我的xAxis在我将指定的位置。例如,如果我想要在以下位置的刻度,[ - 11,0,11,18,30,42],我该怎么办?

I am making a graph using d3 and I wanted to put the ticks on my xAxis at positions which I would specify. For example if I wanted the ticks at the following positions,[-11,0,11,18,30,42], how would I do that?

谢谢

推荐答案

请参阅文档 - axis.tickValues()

See the documentation -- axis.tickValues().

这篇关于手动定位轴 - D3上的刻度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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