Tim Hallman
Tim Hallman

Reputation: 894

Plotting realtime bar chart after pre-populating data with flot.js

Here is the fiddle.

What I am trying to accomplish:

I want to poll the server for data, then populate the entire bar graph. After which I want to update the bar graph in realtime (or say every 1 minute).

This site uses a graph (at the bottom) very much like what I'm trying to do. As you can see, the initial data gets plotted, and then the graph updates, but I am stuck on how to update the ticks at the bottom, so the original data slides out to the left.

I am using the method suggested here: Realtime chart using flot jquery

I've tried using this, but doesn't do the trick:

yaxis: { 
        ticks: [1,2,3] 
}

Upvotes: 2

Views: 612

Answers (1)

Sergio
Sergio

Reputation: 28845

You need to change the plot_bot.getOptions().xaxes[0].min

Here is a example

Upvotes: 3

Related Questions