2

I've been tinkering, making a little chart with Flot and some of it's plugins. The purpose is to provide a chart tracking basal body temperature, with the date per day on the x axis, degrees on the y axis. Panning will shift the x axis, so you can see previous dates etc, clicking will result in a new point, snapped to grid.

The grid on a time based axis when panning does not move. It does when I change the axis type to normal. I really want to have the entire grid move, because now the line series sort of 'floats around' on the grid. Does anyone know how to make that work? Am I missing something in the options?

This is harder to explain than it is to see, so fsfiddle provided: http://jsfiddle.net/jorgthuijls/caM3q/1/

Triggering the change in behaviour is the option mode: 'time' on the x axis option (line 24 of the fiddle).

The bit of code to pay attention to:

        xaxis: {
            show: true,
            min: firstDay,
            max: lastDay,
            ticks: 31,
            mode: 'time',
            timezone: 'browser',
            timeformat: '%d. %m'
        },

change this to

        xaxis: {
            show: true,
            min: firstDay,
            max: lastDay,
            ticks: 31,
        },

and see what happens moving the graph after adding a few points.

Much appreciated!

4

1 に答える 1