About an hour later, Jeff stops back by the office. We show him our prototype. "This is cool. My guys are still trying to figure out how to pass the information from the routers to our web servers. In the meantime, I had them create a mock endpoint that you can test against. I told them to e-mail you the link." Jeff leaves, and a few minutes later, we receive an e-mail from Mark in IT.
We load the URL and see that the page contains the single array [200]. With this endpoint, we'll only need to change a few things in our meter.
We save our previous gauge chart as a new file and begin making our modifications, as follows:
We start by adding
dataPull
to format our data. We only need to wrapremoteData
in an array, as shown in the following code snippet:$(document).ready(function(){ function dataPull(remoteData,options) { return [remoteData]; }