Round number x-axis jQuery flot graph

I would like to round (0 decimal) the values ​​on the x axis of the fleet graph. Showing week numbers x-axix. Does anyone know how to do this?

http://www.snowcams.eu/snowcondition/saas%20fee/998

+3
source share
1 answer

Here is your solution (all this can be found in the API Documentation plugin )

$.plot(
    $("#placeholder"),
    [{data:d1, lines:{show: true}, points:{show: true}, label:"Mountain"}],
    {xaxis: {tickSize:1, tickDecimals:0 }}
);
+13
source

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


All Articles