Up to this point, most of our charts used static data stored within our HTML files. We made some interactive charts where we reloaded the data, but we had to reload the entire page. There are two methods in jqPlot: redraw
and replot
. These methods allow us to rebuild our charts without reloading the page.
In this chapter, we will cover the following topics:
Creating a meter gauge chart showing current Wi-Fi users for a particular store
Using the
replot
method to refresh the number of Wi-Fi users at set intervalsUsing the
replot
method to change the dataset our chart is using and update the chart accordinglyUsing
replot
to dynamically build our chart, based on the data received from the remote data source
We come to work on Friday morning and find Jeff from IT waiting for us. "Morning", he says. We ask him what we can do for him.
"I was talking with Sara yesterday," Jeff says. "She told me she was concerned about people coming into our store, browsing...