[英]How do I change the stepping of y-axis values in Flot?
I have a graph of memory use over time which looks like: 我有一个内存使用随时间变化的图表,看起来像:
I set the y-axis: { max:n }
value n
to 1024 (which means 1024MB of RAM). 我的设定
y-axis: { max:n }
值n
1024(这意味着RAM 1024MB)。
How do I get Flot to change the y-axis labels so they display: 如何让Flot更改y轴标签,使其显示:
1024 768 512 256 128 0
You can use the ticks
option for this: 您可以使用
ticks
选项:
yaxis: { max: 1024, ticks: [128, 256, 512, 768, 1024] }
You can test it out here , the markings
option is just to give it a bit of style, if you're after an effect like that at all. 你可以在这里测试它 ,
markings
选项只是为了给它一点风格,如果你正在完成这样的效果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.