I'm trying to customize jQuery Flot to remove gaps between dots on time axis. Look at the top image:
It shows the data for two days, and I bet you spot the night. What I want to do is to get rid of this annoying gap in the middle of the chart. Any suggestions how to do this?
Too bad I can't accept a comment as an answer, since the answer from George Roberts from Mark's link worked smoothly.
So what I had to do is to change the mode of the flot from 'time' to null and then emulate a time axis.
I've created two arrays: the first one with data for the graph and the second one with timestamps:
Time axis emulation:
It solves the problem, but it's hard to distinguish one day from another, so I added markings:
The result:
Use transform and
inverseTransform
, which were designed for situations such as this. See the following portion of the FLOT documentation.