How to change the stepping of Y axis values ​​in Flot?

I have a graph of memory usage over time that looks like this: alt text

I set the value y-axis: { max:n } nto 1024 (which means 1024 MB of RAM).

How do I get Flot to change the labels of the Y axis so that they appear:

1024
 768
 512
 256
 128
   0     
+3
source share
1 answer

You can use the parameter ticksfor this:

yaxis: { max: 1024, ticks: [128, 256, 512, 768, 1024] }

Here you can test it , the option markingsis just a little more comfortable if you after so effect at all.

+3
source

Source: https://habr.com/ru/post/1770840/


All Articles