Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使 x 轴仅在 jqPlot 上显示整数?
目前它是这样写的:
0.5, 1, 1.5, 2, 2.5, etc.
我想强制它只在 x 轴标签中显示整数。
您可能需要指定格式字符串:
axes: { xaxis: { tickOptions: { formatString: "%d" } } }